[comp.sys.mac.programmer] Really basic assembly language question: moving words from mem. and reg.

ra_robert@gsbacd.uchicago.edu (05/28/89)

I've been reading Knaster's book and in the intro to assembly language section
he says: 

"If a .W suffix is used with a memory location, the word is taken from the byte
addressed and the one immediately following it...If the operand is a register,
the lower word of the register is used, ignoring the upper word".

OK, so let's say you have the long word $44 99 85 6C at memory location $100. 
So, the byte at $100 is $44 and the byte at $101 is 99, right?   Let's say you
also have this long word in register D0.  Now if you move a word (MOVE.W) from
memory location $100 to somewhere else, you'll be moving $44 99, right?  And if
you move a word (MOVE.W) from D0, you'll be moving $85 6C.  So with a MOVE.W
instruction, what you're moving depends on whether you're moving from a memory
location or from a register, right?

I'm an assembly language novice (as you can tell).  Any info much appreciated.

 
Robert
------
ra_robert@gsbacd.uchicago.edu
------
generic disclaimer: all my opinions are mine

ra_robert@gsbacd.uchicago.edu (05/29/89)

Thanks very much to all the people who've helped answer my question!

Robert
------
ra_robert@gsbacd.uchicago.edu
------
generic disclaimer: all my opinions are mine