Hello all
Gives any simply calculation“s macros for Masm what i can use in a call like cpp?
example +,-,*,/
testproc( pstruct->item, pstruct->item1 - pstruct->item0 - 1 );
regards,
Sure:
include \masm32\MasmBasic\MasmBasic.inc ; download (http://masm32.com/board/index.php?topic=94.0)
Init
mov eax, 100
mov ecx, 1000
fldpi
Inkey Str$("10*PI=%f", ecx/eax*ST(0))
Exit
end start
10*PI=31.41593
But wait for qWord, he can explain what SmplMath (http://sourceforge.net/projects/smplmath/) is all about ;-)
Hi Jochen
I have look in simplemath and i can understand it works this with Fpu?!?
I wish only with sub,add,Imul,Idiv and eax,ebx.....
After compile it with cpp
"testproc( pstruct->item, pstruct->item1 - pstruct->item0 - 1 );"
is this only
mov edx, [eax+385h]
mov eax, [eax+389h]
dec ecx
push ecx
sub eax, edx
push edx
call testproc
And this same Macros for Masm32 is wonderful :biggrin: