A simple question in assembler 8086

I study 8086 assembler in high school and I have this question:

For example, I have this number ABCD (hex). How is it stored in memory?

Is there an AB, for example, in memory address 01, and the CD goes to address 02?

+4
source share
3 answers

8086 saves values ​​in a slightly endian format . Therefore, the lower order byte (i.e., the CD) is written first, and then the high byte is stored. So in your case it will be address 01 will have CD and 02 will be AB.

+10
source

Depends on the Endianness of the system you are working on.

Systems

x86 uses a bit of endian, so the ABCD value will appear in memory as a CD, followed by AB

+2
source

8086 uses the small endian format .

+1
source

Source: https://habr.com/ru/post/1307539/


All Articles