Works fine with my big sources but it chokes with this one (an old source that built fine years ago... mystery ::)):
include \masm32\MasmBasic\Res\MbGui.asm
.data?
MyFonts dd 4 dup(?)
.code
mov edi, offset MyFonts
MakeFont stosd, Height:14, "Times New Roman"
MakeFont stosd, Height:16
MakeFont stosd, Height:20
MakeFont stosd, Height:24
Event Paint
For_ ct=0 To 3
mov ecx, ct
GuiTextBox ct*32+7, ct*64+7, 100, 50, Str$("This is textbox #%i ", ct+1), font MyFonts[4*ecx]
Next
GuiEnd
The issue is admittedly exotic (and there is a workaround, see attached project):
include \masm32\include\masm32rt.inc
any macro arg
Local oa
oa = opattr arg
if oa eq 48
print "&arg is a register", 13, 10
else
print "&arg is not a register", 13, 10
endif
endm
.code
start:
any eax
any nop
inkey "Hello World"
exit
end start
This works in UAsm and ML. This doesn't: if (opattr arg) eq 48
In short:
oa = opattr arg works with everything,
if (opattr arg) eq ... doesn't work with an "exotic" arg like nop or stosd
This is an inconsistent behaviour, btw also of Microsoft MASM. So if you decide to remain compatible, I will support your decision :lol:
IMHO if (opattr arg) should use 0 to indicate "other" if the arg doesn't fit into the immediate, mem, register etc categories, but it should never throw an error.