The compile-time operator AND, OR, NOT, and XOR are bitwise operator.
Does MASM support compile-time logical operators?
The goal would be to do use them in macros, like:
foo macro arg1, arg2
if arg1 eq 11 && arg2 eq 22
; ...
endm
endm
Edit: I didn't read the topic title closely. You're talking about compile time operators.
MASM uses
AND, not
&&.
QuoteEQ - Returns true (-1) if expression1 equals expression2, or returns false (0) if it does not.
In this case,
AND is logical
foo macro arg1, arg2
if (arg1 eq 11) and (arg2 eq 22)
; ...
endm
endm
I added the brackets for clarity.
Assemble-time, not compile-time (same difference but still), but yes, those operators are usable.
Very handy.
Quote from: sinsi on May 06, 2025, 09:43:55 AMfoo macro arg1, arg2
if (arg1 eq 11) and (arg2 eq 22)
; ...
endm
endm
Thanks
I seen old 13h demo code,how powerful compile time stuff can be used to compile time create several palettes of blue fire,red fire,green fire etc ,in source file,with conditional jump to desired palette to compile