32
The 68000's Instruction Set
Take care because the MOVEA.W #$8000,A0 instruction sign-extends
the source operand to $FFFF8000 before loading it into A0,
whereas LEA $8000,A0 loads A0 with $00008000.
You should appreciate that the MOVEA and LEA instructions are
not interchangeable. The operation MOVEA (Ai),An cannot be
implemented by an LEA instruction, since MOVEA (Ai),An performs
a memory access to obtain the source operand, as the following
RTL demonstrates.
LEA (Ai),An = [An] ← [Ai]
MOVEA (Ai),An
= [An] ← [M([Ai])]
Condition codes: X N Z V C
- - - - -
Source operand addressing modes
MOVE to CCR Copy data to CCR from source
Operation: [CCR] ← [source]
Syntax: MOVE <ea>,CCR
Attributes: Size = word
Description: Move the contents of the source operand to the condition code
register. The source operand is a word, but only the low-order
byte contains the condition codes. The upper byte is neglected.
Note that MOVE <ea>,CCR is a word operation, but ANDI, ORI, and
EORI to CCR are all byte operations.
Application: The move to CCR instruction permits the programmer to preset
the CCR. For example, MOVE #0,CCR clears all the CCRs bits.
Condition codes: X N Z V C
* * * * *