I am quit not sure about this problem for a long time and want some help.
Given the following 2 - bytes
number y
which is equal to: 0x0110
, that's declared in assembly in data section, how is it stored in memory?
In little endian lower bytes are stored in lower memory addresses so we should see something like this:
At Adress 1001 : 01
At Adress 1000 : 10
Now in assembly x86-64 (att) when I so addb y, %al
which option is correct:
- it always reads 10.
- it always reads 01.
- reads 01 in little endian and 10 in big endian.
- opposite of 3.
In other words, is y the lower of higher byte?