Just added one more macro that simplifies the initialization of one or more MREAL values:
MREAL x = -123 , y = 0x123 , z = 0.005 , k = 0f00h
See the attachment in the first post.
The following macro might be useful for people working with GDI+ or DirectX/Draw/..., because it allows to use floating point immediates (REAL4) as instruction parameter or with the INVOKE directive.
immFP4 macro numeric_literal:req
MR_FROM_STR ?x,numeric_literal
fp4__txt TEXTEQU MR_TO_IEEE(<REAl4>,?x)
fp4__size SIZESTR fp4__txt
EXITM @CatStr(@SubStr(%fp4__txt,1,fp4__size-1),<h>)
endm
example usage:
mov eax,immFP4(-123.E-8)
;
invoke GdipAddPathRectangle,path,0,0,immFP4(2.25),immFP4(3.3)
(the classical approach is to create an anonym REAL4 variable, which is copied at runtime. For compare see the FP4-macro of the MASM32 SDK)