-1

if I was to use: mov ax, 0x0904

would it be stored with ah being 0x04 and al being 0x09 or would it be the other way around?

Armature
  • 37
  • 7
  • related [Is mars MIPS simulator Big or Little Endian](https://stackoverflow.com/a/46555190/4271923) – Ped7g Oct 05 '18 at 14:31

1 Answers1

1

The other way around - AL will be 4, AH will be 9. H in AH stands for "high", L stands for "low".

x86 is a little endian machine though. If you store the same value in memory, say, at address 0x1000, the byte at 0x1000 will be 4 and the byte at 0x1001 will be 9.

On a side note, hex numbers 0x04 and 0x09 are 4 and 9, respectively.

Seva Alekseyev
  • 59,826
  • 25
  • 160
  • 281
  • Thank you. I was unsure if the little endian format applied to the registers too. – Armature Oct 05 '18 at 14:06
  • 6
    @Armature Endianness has no meaning in registers, only in memory. So no, registers are nor little-endian neither big-endian because they have no addresses. – m0skit0 Oct 05 '18 at 14:08