Wednesday, March 17, 2021

Endianness

  • Descriibes how data is stored and retrieve from memory
  • Example:


  • x86 uses Little Endian (least significant bytes stored at first memory address allocated)

  • Here is what it looks like in reality. Given the code below, the least siginificant byte of each element in array (e.g 34h and 78h) will be stored first.

.data
myWords WORD 1234h,5678h

.code
mov esi,offset myWords


  • In Visual studio memory debugger, it will be shown like this.

No comments:

Post a Comment