[destination] ← [source]
MOVE <ea>,<e>
MOVE (A5),-(A2)
MOVE -(A5),(A2)+
MOVE #$123,(A6)+
MOVE Temp1,Temp2
Size
byte, word, longword
Move the contents of the source to the destination location. The data is examined as it is moved and the condition codes set accordingly. Note that this is actually a copy command because the source is not affected by the move. The move instruction has the widest range of addressing modes of all the 68000's instructions.
X | N | Z | V | C |
---|---|---|---|---|
- | * | * | 0 | 0 |
Dn | An | (An) | (An)+ | ‑(An) | (d,An) | (d,An,Xi) | ABS.W | ABS.L | (d,PC) | (d,PC,Xn) | imm |
---|---|---|---|---|---|---|---|---|---|---|---|
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Dn | An | (An) | (An)+ | ‑(An) | (d,An) | (d,An,Xi) | ABS.W | ABS.L | (d,PC) | (d,PC,Xn) | imm |
---|---|---|---|---|---|---|---|---|---|---|---|
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
[CCR] ← [source]
MOVE <ea>,CCR
Size
word
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.
The move to CCR instruction permits the programmer to preset the CCR. For example, MOVE #0,CCR
clears all the CCR's bits.
X | N | Z | V | C |
---|---|---|---|---|
* | * | * | * | * |
Dn | An | (An) | (An)+ | ‑(An) | (d,An) | (d,An,Xi) | ABS.W | ABS.L | (d,PC) | (d,PC,Xn) | imm |
---|---|---|---|---|---|---|---|---|---|---|---|
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
[destination] ← [SR]
MOVE SR,<ea>
Size
word
Move the contents of the status register to the destination location. The source operand, the status register, is a word. This instruction is not privileged in the 68000, but is privileged in the 68010, 68020, and 68030. Executing a MOVE SR,<ea>
while in the user mode on these processors results in a privilege violation trap.
X | N | Z | V | C |
---|---|---|---|---|
- | - | - | - | - |
Dn | An | (An) | (An)+ | ‑(An) | (d,An) | (d,An,Xi) | ABS.W | ABS.L | (d,PC) | (d,PC,Xn) | imm |
---|---|---|---|---|---|---|---|---|---|---|---|
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
IF [S] = 1
THEN [SR] ← [source]
ELSE TRAP
MOVE <ea>,SR
Size
word
Move the contents of the source operand to the status register. The source operand is a word and all bits of the status register are affected.
The MOVE to SR
instruction allows the programmer to preset the contents of the status register. This instruction permits the trace mode, interrupt mask, and status bits to be modified. For example, MOVE #$2700,SR
moves 00100111 00000000 to the status register which clears all bits of the CCR, sets the S-bit, clears the T-bit, and sets the interrupt mask level to 7.
X | N | Z | V | C |
---|---|---|---|---|
* | * | * | * | * |
Dn | An | (An) | (An)+ | ‑(An) | (d,An) | (d,An,Xi) | ABS.W | ABS.L | (d,PC) | (d,PC,Xn) | imm |
---|---|---|---|---|---|---|---|---|---|---|---|
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
IF [S] = 1 {MOVE USP,An form}
THEN [USP] ← [An]
ELSE TRAP
IF [S] = 1 {MOVE An,USP form}
THEN [An] ← [USP]
ELSE TRAP
MOVE USP,An
MOVE An,USP
Size
longword
Move the contents of the user stack pointer to an address register or vice versa. This is a privileged instruction and allows the operating system running in the supervisor state either to read the contents of the user stack pointer or to set up the user stack pointer.
X | N | Z | V | C |
---|---|---|---|---|
- | - | - | - | - |
From MOTOROLA M68000 FAMILY Programmer's reference manual. Copyright 1992 by Motorola Inc./NXP. Adapted with permission.