I need help understanding endianness inside CPU registers of x86 processors. I wrote this small assembly program:
section .data
section .bss
section .text
In simple words, treat registers as just values, endiannes on how they are finally stored is not important.
You know that writing on eax you write a 32 bit number, and you know that reading from eax you will read the same 32 bit number. In this terms, endianness doesn't matter.
Than you know that in "al" you have less significant 8-bit part of the value, in "ah" most significan 8-bit part of the lower 16 bits. There is no way to access single bytes on higher 16bits, except of course reading the whole 32 bit value.