TIP: Click on subject to list as thread! ANSI
echo: 80xxx
to: JAMES VAHN
from: DARRYL GREGORASH
date: 1997-12-24 13:09:00
subject: Moving things in ASM

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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.