Can all the computer programmers please read!!! I have a question for you.
Real programmers need no fluff and should be able to do this in assembly language for the 80x86.....
...man if i had the time to go back to my notes for a refresher, I'd show you young bucks a thing or two.
...man if i had the time to go back to my notes for a refresher, I'd show you young bucks a thing or two.
Originally posted by Luder94
Real programmers need no fluff and should be able to do this in assembly language for the 80x86.....
...man if i had the time to go back to my notes for a refresher, I'd show you young bucks a thing or two.
Real programmers need no fluff and should be able to do this in assembly language for the 80x86.....
...man if i had the time to go back to my notes for a refresher, I'd show you young bucks a thing or two.

<sigh> I can remember when having a 16-bit index register seemed soooooooooooo cool...
Tim
anyway, here's some code that should compile under tasm
Extrn Getdec:Far
Extrn Putdec:Far
Extrn PutStrng:Far
Data Segment
Prompt db "ENTER TEMPERATURE IN DEGREES FAHRENHEIT ";
Annotation db " TEMPERATURE IN DEGREES CENTIGRADE ";
Data Ends
Code Segment
Assume Cs:Code, Ds
ata, Ss: SSeg
main Proc Far
Mov Ax, Seg Data
Mov Ds, Ax
Mov Es, Ax
Mov Cx, 40
Lea Di, Prompt
Call Putstrng
Call Getdec
Sub Ax, 32
Mov Bx, 5
Imul Bx
Mov Bx, 9
Idiv Bx
Xchg Ax, Dx
Mov Bl, 5
Idiv Bl
Cbw
Add Ax, Dx
Mov Cx, 40
Lea Di, Annotation
Call Putstrng
Mov Bh, 0
Call Putdec
Mov Ah, 4ch
Int 21h
main Endp
Code Ends
SSeg Segment STACK
DB 254 dup(?)
SSeg Ends
End main
Extrn Getdec:Far
Extrn Putdec:Far
Extrn PutStrng:Far
Data Segment
Prompt db "ENTER TEMPERATURE IN DEGREES FAHRENHEIT ";
Annotation db " TEMPERATURE IN DEGREES CENTIGRADE ";
Data Ends
Code Segment
Assume Cs:Code, Ds
ata, Ss: SSegmain Proc Far
Mov Ax, Seg Data
Mov Ds, Ax
Mov Es, Ax
Mov Cx, 40
Lea Di, Prompt
Call Putstrng
Call Getdec
Sub Ax, 32
Mov Bx, 5
Imul Bx
Mov Bx, 9
Idiv Bx
Xchg Ax, Dx
Mov Bl, 5
Idiv Bl
Cbw
Add Ax, Dx
Mov Cx, 40
Lea Di, Annotation
Call Putstrng
Mov Bh, 0
Call Putdec
Mov Ah, 4ch
Int 21h
main Endp
Code Ends
SSeg Segment STACK
DB 254 dup(?)
SSeg Ends
End main







