Maybe there is somebody ready macro? I need something likemovr local_var, 3.1415926
wher local_var is a local variable and macro movr x, y
... <-- I dont know yet
dd y
endm
something likedb 68h;push
dd 3.1415926
pop local_var
but without the instructions "Push/pop" and FPU-instructions
thank you!
include \masm32\include\masm32rt.inc
SetLocalFloat MACRO dest, immfloat
fld FP8(immfloat)
fstp dest
ENDM
.code
mytest proc
LOCAL MyR8:REAL8
SetLocalFloat MyR8, 123.456
printf("\nR8=%f\n", MyR8)
ret
mytest endp
start:
call mytest
exit
end start
Hi,
jj2007!
Quotebut without the instructions "Push/pop" and FPU-instructions
I need something like
db 0C7h,85h,68h
dd 3.1415926;== mov dword ptr [rbp-98h], 3.1415926
somevar dd 3.1415926 ; won't assemble == mov dword ptr [rbp-98h], 3.1415926
somevar REAL4 3.1415926;== m2m dword ptr [rbp-98h], dword ptr somevar ; 3.1415926
Perhaps you should explain the context...
macro by KyberMax
movr MACRO x, y
MOV x, 0
ORG $ - SizeOf REAL4
dd y
ENDM
Yes, that works. But so does this built-in Masm32 macro:
mov ecx, FP4(111.222)
I did not know about it (http://www.cyberforum.ru/images/smilies/sorry.gif)
And I did not know that the assemblers (Masm, JWasm, AsmC) accept a mov eax, somereal4 ::)
Hi Mikl,
Just saw your fractal tree code - very nice :t
I had some trouble building it, though. Attached a slightly modified version that builds with standard Masm32, in case somebody is interested. No macros, though, you are not even using invoke ;-)