how to multiplie 123 * 0.006 in masm32 (numerals)???

Started by mahmudkais, September 20, 2009, 07:49:18 PM

Previous topic - Next topic

mahmudkais

hello
im new but im learning
in masm32
how to multiple tow numbers lets say 1200000  * 0.006
sorry for  week English i don't  know  how to represent the second number "0.006" in English is it (numerals) ???
thanks




jj2007

It seems this file is not part of the latest Masm32 version, so I attach it here. It answers your questions.

mahmudkais

a sample code please
its like dividing the number to 166.6
lets say i want to multiply 1000 * 0.006
how can i do that in masm32
can i simply divide the number by 166 ??

thanks

mahmudkais

i found it and it is simple

1000 * 0.006  =   (1000 * 6 )/1000  = 6


MOV   EAX, 1000
mov ebx,6
mul   ebx
mov ebx,1000

div   ebx


thanks


Farabi

Check out about FPU on the masm help.


FLD value  ; Load the value to FPU
fdiv divider ; Divide it
fstp value  ; store the result to value
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"