ADDRESS METHODS (source): | Dn, An, (An), (An)+, -(An), x(An), x(An,xr.s), x.w, x.l
x(PC), x(PC,xr.s), #x |
ADDRESS METHODS (for the destination): Dn, (An), (An)+, -(An), x(An), x(An,xr.s), x.w, x.l
The address method An can only be used when the data length is a word or a longword.
FLAGS: | X - U |
N - S | |
Z - S | |
C - 0 | |
V - 0 |
SYNTAX: MOVE <ea>,<ea>
The instruction MOVEA moves data to an address register (An is, as you may have noticed missing in address methods for the destination). Most assemblers choose MOVEA is you have an address register as an operand.
EXAMPLE CODE:
MOVE.B D0,D1 moves the lower 8 bits of D0 to D1, does not change the upper 24 bits of D0 or
D1
MOVE.W D0,D1 moves the lower 16 bits of D0 to D1, does not change the upper 16 bits of D0 or
D1
MOVE.L D0,D1
moves all 32 bits of D0 to D1
ADDRESS METHODS: | Dn, (An), (An)+, -(An), x(An), x(An,xr.s), x.w, x.l,x(PC), x(PC,xr.s), #x |
DATA LENGTH: Word
FLAGS: Set according to the bits of the byte you moved to CCR.
SYNTAX: MOVE <ea>,CCR
EXAMPLE CODE:
MOVE D0,CCR moves the lower 16 bits of D0 into the CCR
ADDRESS METHODS: | Dn, (An), (An)+, -(An), x(An), x(An,xr.s), x.w, x.l, x(PC), x(PC,xr.s), #x |
DATA LENGTH: Word
FLAGS: Set according to the lower bits in the word you moved to SR.
SYNTAX: MOVE <ea>,SR
EXAMPLE CODE:
MOVE.W D0,SR *Moves the lower word in D0 to the SR
EXAMPLE CODE:
MOVE.W SR,D0 *Moves the SR into the lower word of D0