I recall somebody already answered it but I forget where it is, anyone can re-explain?
.if eax < 0 ; unsigned compare - this condition will never become true
.if SDWORD ptr eax < 0 ;make signed dword-compare
(SWORD ptr, SBYTE ptr, SQWORD ptr)
Thanks
What version(s) of ML recognize SQWORD?
Version 9.0 recognises the MySQW SQWORD 123 but gives error A2070:invalid instruction operands for the .if:
include \masm32\include\masm32rt.inc
.code
MyVar dd 123, 456
MySQW SQWORD 123
start: mov eax, offset MyVar
.if sqword ptr [eax]<0
nop
.endif
exit
end start
SQWORD ptr can be used with jwasm in 64Bit mode :cheekygreen: - for ml it wont work.
Quote from: qWord on March 11, 2010, 04:55:45 PM
SQWORD ptr can be used with jwasm in 64Bit mode :cheekygreen: - for ml it wont work.
There are the usual workarounds :lol
include \masm32\include\masm32rt.inc
.code
MyVar dd 123, 456
SQpos SQWORD 123
SQneg SQWORD -123
start:
mov eax, offset SQpos
.if sbyte ptr [eax+sqword-1]<0
print "SQpos is negative", 13, 10
.else
print "SQpos is positive", 13, 10
.endif
mov eax, offset SQneg
.if sbyte ptr [eax+sqword-1]<0
print "SQneg is negative", 13, 10
.else
print "SQneg is positive", 13, 10
.endif
inkey chr$(13, 10, 10, "Hit any key to get outta here")
exit
end start