i am working on MASM32v8. i found that .WHILE and .IF directive can not work correctly on negtive numbers.
Such as
mov eax, -1
.WHILE eax <= 1
inc eax
.ENDW
Could any one tell me is there any directive like .WHILE but can work on negtive numbers?
Such as
mov eax, -1
.WHILE eax <= 1
inc eax
.ENDW
Could any one tell me is there any directive like .WHILE but can work on negtive numbers?
You must cast the register to a signed DWORD:
.WHILE SDWORD PTR eax <= 1
...
.ENDW
.WHILE SDWORD PTR eax <= 1
...
.ENDW
Thanks very much.