Page 1 of 1

Mov al, byte [memory] - adding padding?

Posted: Fri Mar 16, 2012 2:07 am
by GraveMind
Hi,

Was trying to work out why this instruction causes padding in high memory. E.g "[memory location],00" after the instruction and ModRM byte.

Code I'm getting is:

Code: Select all

8A 16 C1 00 to represent mov dl, byte [memory]
Jim

Re: Mov al, byte [memory] - adding padding?

Posted: Fri Mar 16, 2012 2:29 am
by Combuster
There is no such thing as an 8 bit absolute address. You're running in 16 bits mode and therefore the absolute address is 16 bits wide (and occupies two bytes).

Re: Mov al, byte [memory] - adding padding?

Posted: Fri Mar 16, 2012 3:03 am
by GraveMind
Ah I see, thanks!