I really wonder why you need an assembler "feature" for such crap. It's a macro assembler, folks...
include \masm32\include\masm32rt.inc ; pure Masm32
include usesFlags.inc
.code
test1 proc arg1, arg2
usesFlags
mov eax, arg1
dec eax ; 123-1=?
usesFlags
ret
test1 endp
test2 proc arg1
usesFlags
mov eax, arg1
dec eax ; 123-1=?
usesFlags
ret
test2 endp
start:
xor ebx, ebx ; set the zero flag
invoke test1, 123, 456
.if Zero?
print "the usesFlags macro worked fine"
.else
print "bad luck, it didn't work"
.endif
dec ebx ; set the sign flag
invoke test2, 123
.if Sign?
MsgBox 0, "the usesFlags macro worked fine", "Hi", MB_OK
.else
MsgBox 0, "bad luck, it didn't work", "Hi", MB_OK
.endif
exit
end start