I have several questions about memory and registers in X86 assembly:
I have a string
"abcdefgh"
, and register%eax
holds a pointer to the string. Now I usemovl (%eax), %edx
to grab the first four bytes of the string into%edx
. How are they stored in the register? Is the characterd
in the%dl
register, or is it the charactera
?When using
movb %eax, %dl
for example, which of%eax
's bytes does it actually move? The one in%al
or the opposite one? Is it even possible to do this? Or should I use a pointer like this -movb (%eax), %dh
- to take the first byte the pointer points to?