Am i doing something wrong here:
macro:
test_macro macro vr1
if vr1 eq 0
xor ecx, ecx
else
mov rcx, vr1
endif
endm
this code:
test_macro FALSE ; 0
test_macro TRUE ; 1
test_macro WS_EX_CLIENTEDGE ; 200h
test_macro WS_EX_CONTROLPARENT ; 10000h
test_macro WS_EX_CLIENTEDGE or WS_EX_CONTROLPARENT ; 10200h
is assembled like this:
xor ecx,ecx
mov rcx,1
mov rcx,200h
mov rcx,10000h
xor ecx,ecx ; WTF???
He thinks it is equal to zero every time i put "or", how to resolve this?
hi,
this is not a bug. masm replace vr1 by "WS_EX_CLIENTEDGE or WS_EX_CONTROLPARENT" and this is treated as: "if WS_EX_CLIENTEDGE OR ( WS_EX_CONTROLPARENT eq 0)".
change "if vr1 eq 0" to "if (vr1) eq 0"
regards, qWord
Ahhh, didn't know that, thank you. It works now.