movea
Move address
Moves the value from the first operand to an address register, sign extending a word to long and leaving sr unchanged.
Sizes .w .l, .w by default
XNZVC –––––
- Changes no flag
Forms
Operands
<ea>- An operand using one of the instruction’s supported addressing modes, such as
d0,(a0)+or4(a1). It may name a register, memory or an immediate value. More An- An address register,
a0toa7;spis another name fora7. More #imm- An immediate value written after
#: a number, character or label, such as#10,#$FFor#'a'. It must fit the operation’s size: byte-128to255, word-32768to65535, or long-2147483648to4294967295; signed and unsigned spellings are accepted. More
If the size is word, it is sign extended to long. It does not change the SR. When using word size, the first operand is sign extended to long and the second is written as a long.
* --- Word is sign-extended to long ---
move.l #$0008, d0
movea.w d0, a0
* --- Negative word sign-extends with 1s ---
move.l #$FFF0, d1
movea.w d1, a1 ; a1 = $FFFFFFF0
* --- Long is copied as-is ---
move.l #$12345678, d2
movea.l d2, a2
* --- Does not affect flags ---
move.l #0, d3
tst d3
movea.l #$FFFFFFFF, a3 ; flags unchanged