Replying to a message of James Vahn to Chris Berkhout:
>> mov ah,b[var]
>> mov al,b[var+1]
>> var dw 0102Fh
JV>
>> AX = 0201h, aren't they meant to do the same thing ?
JV> Nope, little endian. AX = AL AH
The confusion which arises in this regard constantly amazes me.
We think of memory as beginning at lower addresses, and we write this
left-to-right on our page accordingly, so that the least significant bits are
on the left. But when it comes to things like bytes and words and whatnot, we
write the *most* significant bits/bytes/whatever on the left.
Then we turn around and think the Intel CPU stores things backwards :)
--- FleetStreet 1.21 NR
---------------
* Origin: BIG BANG Burger Bar: Regina SK Canada (1:140/86)
|