Author Topic: INC DEC versus ADD SUB  (Read 420 times)


  • Member
  • *****
  • Posts: 1370
« on: December 30, 2016, 09:11:25 AM »
I did some testing with this .WHILE thing and it appear to be the inverse problem that resulted in the current hack. The test was added in v2.11 and I  extended the test to preserve the (missing) label. This removed the error message but not the actual problem. The fix you provided appear to work for the current test but fails if you invert the statement.
Code: [Select]
.while (eax || edx) && ecx
.while !(eax || edx) && ecx

The same seems to apply to .IF/.ELSEIF/.UNTIL and so on. The jump-around label is lost and should at best be replaced with the exit label.

ML code:
Code: [Select]
.while !(eax || edx) && ecx
 00000000  EB 01    *     jmp    @C0001
 00000002    *@C0002:
 00000002  90 nop
 00000003    *@C0001:
 00000003  0B C0    *     or eax, eax
 00000005  75 08    *     jne    @C0003
 00000007  0B D2    *     or edx, edx
 00000009  75 04    *     jne    @C0003
 0000000B  0B C9    *     or ecx, ecx
 0000000D  75 F3    *     jne    @C0002
 0000000F    *@C0003: