hello,
i recently made a mistake in my code trying to use
.if eax<0
...
which wasn't working as expected, because eax was always treated as positive number, even though i explicitly moved -1 to eax :P
is there a different way than coding:
.if eax<=-1
...
?
And i wondered if there is a way to check the flags with the .if/.elseif constructs, somehow like this:
.if zeroflag
...
?
oliver
Hi Oliver,
Welcome on board. Try something like this.
.if SDWORD PTR eax < 0
Oliver,
Welcome :U
I nice learning tool is to use Svin tttn for op code jump decisions.
Regards, P1 :8)
[attachment deleted by admin]
I think you're looking for ".IF (ZERO?)"?
thanx for the welcome and the suggestions,
i'll give them a try
@ehtyar yes, that was what i was looking for, i guess there is an ".if (SIGN?) " also
thx,
oliver
You will find all of these operators in the masm32.hlp file that comes with masm32. The available flags are:
CARRY?
OVERFLOW?
PARITY?
SIGN?
ZERO?
Hope this helps, Ehtyar.