开发者

Byte order in memory after storing a 16-bit number on 8086?

开发者 https://www.devze.com 2022-12-27 11:04 出处:网络
I\'m studying 8086 assembly language at high school and I have this question: For example I have this number ABCD (hex). How is it stor开发者_StackOverflow中文版ed on the memory?

I'm studying 8086 assembly language at high school and I have this question:

For example I have this number ABCD (hex). How is it stor开发者_StackOverflow中文版ed on the memory?

Does the AB go for example to memory address 01 and the CD goes to address 02?


8086 stores the values in little endian format. So the lower order byte (i.e. CD) is stored first and then the higher order byte is stored. So in your case it will be address 01 will have CD and 02 will have AB.


Depends on the Endianness of the system you're working on.

x86 systems use little endian, so the value ABCD would appear in memory as CD followed by AB


8086 uses little endian format.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号