anyone can give me an assembly program that can convert pounds to kilos and vice versa with source codes?? its preety urgent thanks in advance.. This message was edited by nash, on 3/18/2001 11:27:01 AM
The below method is very inaccurate. It could only suit the purpose of a interger conversions. A much better (faster, smaller and far mor accurate) method could be used using floating point instructions, but im very rusty on these.
mov eax,kilograms mov edx,453 mul edx mov ecx,1000 div ecx eax = the number of pounds edx = the remainder ( edx pounds) 1000
Floating point code would look something like this:
mov eax,pounds mov edx,1000 mul eax mov ecx,453 div ecx eax = the number of kg edx = the remainder ( edx kg) 453
finit fld kilograms fmul 0.453 fst pounds This message was edited by George, on 3/18/2001 5:25:36 AM