Question

I'm moving some values to rax but debugger is displaying that it's moving to eax. What's the matter with it? Is it with the debugger, nasm or with my knowledge? Anyway of course code is working perfectly. The debugger I'm using is Evan's Debugger.

Was it helpful?

Solution

In a nutshell, both you and the debugger are correct.

When you move something to RAX, this affects RAX, EAX, AX, AL and AH as they refer to various subsets of the same 64 bits:

  • AL is the lower 8 bits of AX (AH is the upper 8 bits).
  • AX is the lower 16 bits of EAX.
  • EAX is the lower 32 bits of RAX.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top