jgoemat Master Cheater
Reputation: 23
Joined: 25 Sep 2011 Posts: 264
|
Posted: Fri Nov 16, 2012 7:37 pm Post subject: dec r8d assembles wrong (bug?) |
|
|
I'm pretty new to 64-bit assembler, but this instruction assembles differently and doesn't seem to work:
| Code: | 02CD0D5B - 41 FF C8 - dec r8d // original instruction
0060008A - 41 48 - dec r8d // assembled by CE
0060008C - 49 48 - dec r8 // another try
0060008E - E9 CB0C6D02 - jmp 02CD0D5E // jump back to code
|
That's just a snippet. Neither "dec r8d" nor "dec r8" assembled by CE seems to work, but "db 41 FF C8" does. If I step at 0060008A in the CE debugger, or NOP it and step at 0060008C, the debugger skips back to the return point, almost like the CPU skips over those instructions and executes the jmp all in one step. If I replace those with "db 41 FF C8", the CE debugger steps over it properly and I can see the value in R8 decrease. If I replace those with "db 49 FF C8" then it also decrements R8 and I can step over it fine.
|
|