I am debugging my x86 code and the problem is being tracked with the AND instruction sometimes it doesn’t clear the ZF flag if the result is not zero. Here is the problematic part of the code:
0257A9F9 mov edx, dword ptr [ecx + 18h]
0257A9FC and edx, 80000h
0257AA02 int 3
0257AA03 je 0257AA2A
I added a breakpoint after AND for debugging. When it stops at the breakpoint EDX == 0x80000 and ZF == 1. But ZF should be cleared if EDX! = 0. The code works fine when there is one step in the debugger, but it does not work sequentially during normal run.
Here is a screenshot of a debugger session.
Any clues?
If it matters, the code is generated by JIT, so I am executing the data.
Thanks in advance.
assembly x86
danila
source share