Category:68000 Assembly: Difference between revisions

m
No edit summary
Line 33:
MOVE.B #$00,D7 ;D7 contains #$FFFFFF00
MOVE.W #$2222,D7 ;D7 contains #$FFFF2222</lang>
 
As you can see, the rest of the register is unchanged. (On the ARM, it would turn to zeroes.) This is very important to remember. If your code is doing something unexpected it might be due to the "old" value of the register corrupting another function.
 
If the given constant is smaller than the length provided, the value is padded to the left with zeroes.
Line 42 ⟶ 44:
<lang 68000devpac>MOVEA.W #$8000,A4 ;A4 = #$FFFF8000. Remember the top byte is ignored so this is the same as #$00FF8000.
MOVEA.W #$7FFF,A3 ;A3 = #$00007FFF</lang>
 
 
 
==Citations==
1,489

edits