M68000 Instruction Sets
M68000 Instruction Sets
Mnemonic Description
JMP Jump
JSR Jump to Subroutine
OR Logical Inclusive-OR
ORI Logical Inclusive-OR Immediate
ORI to CCR Inclusive-OR Immediate to Condition Code Register
ORI to SR Inclusive-OR Immediate to Status Register
UNLK Unlink
PC Program counter
SR Status register
d Address displacement
Notational Conventions
⋅ Arithmetic multiplication
Λ Logical AND
V Logical OR
⊕ Logical exclusive OR
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
1 1 0 0 REGISTER Rx 1 0 0 0 0 R/M REGISTER Ry
Instruction Fields:
Register Rx field—Specifies the destination register.
If R/M = 0, specifies a data register.
If R/M = 1, specifies an address register for the predecrement addressing mode.
R/M field—Specifies the operand addressing mode.
0 — The operation is data register to data register.
1 — The operation is memory to memory.
Register Ry field—Specifies the source register.
If R/M = 0, specifies a data register.
If R/M = 1, specifies an address register for the predecrement addressing mode.
Description: Adds the source operand to the destination operand using binary addition
and stores the result in the destination location. The size of the operation may be
specified as byte, word, or long. The mode of the instruction indicates which operand
is the source and which is the destination, as well as the operand size.
Condition Codes:
XNZVC
∗ ∗ ∗ ∗ ∗
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
1 1 0 1 REGISTER OPMODE EFFECTIVE ADDRESS
MODE REGISTER
Instruction Fields:
Register field—Specifies any of the eight data registers.
Opmode field
a. If the location specified is a source operand, all addressing modes can be used
as listed in the following table:
*Word and long only
Addressing Register
Addressing Register
Mode Mode
Mode Mode
(xxx).W 111 000
Dn 000 reg. number:Dn
(xxx).L 111 001
An* 001 reg. number:An
#<data> 111 100
(An) 010 reg. number:An
NOTE
The Dn mode is used when the destination is a data register;
the destination < ea > mode is invalid for a data register.
Assembler
Syntax: ADDA < ea > , An
Description: Adds the source operand to the destination address register and stores the
result in the address register. The size of the operation may be specified as word or
long. The entire destination address register is used regardless of the operation size.
Condition Codes:
Not affected.
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
1 1 0 1 REGISTER OPMODE EFFECTIVE ADDRESS
MODE REGISTER
Instruction Fields:
Register field—Specifies any of the eight address registers. This is always the
destination.
Effective Address field—Specifies the source operand. All addressing modes can be
used as listed in the following table:
(d8,An,Xn) 110 reg. number:An
Addressing Register
Mode Mode
Instruction Fields:
Size field—Specifies the size of the operation.
00 — Byte operation
01 — Word operation
10 — Long operation
Effective Address field—Specifies the destination operand. Only data alterable
addressing modes can be used as listed in the following table:
Dn 000 reg. number:Dn
Addressing Register An — —
Mode Mode
(An) 010 reg. number:An
(An) + 011 reg. number:An (xxx).L 111 001
(d16,PC) — —
(d8,PC,Xn) — —
Addressing Register
Mode Mode
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
1 1 0 1 REGISTER Rx 1 SIZE 0 0 R/M REGISTER Ry
Instruction Fields:
Register Rx field—Specifies the destination register.
If R/M = 0, specifies a data register.
If R/M = 1, specifies an address register for the predecrement addressing mode.
Size field—Specifies the size of the operation.
00 — Byte operation
01 — Word operation
10 — Long operation
R/M field—Specifies the operand address mode.
0 — The operation is data register to data register.
1 — The operation is memory to memory.
Register Ry field—Specifies the source register.
If R/M = 0, specifies a data register.
If R/M = 1, specifies an address register for the predecrement addressing mode.
Description: Performs an AND operation of the source operand with the destination
operand and stores the result in the destination location. The size of the operation
can be specified as byte, word, or long. The contents of an address register may not
be used as an operand.
Condition Codes:
XNZVC
— * * 0 0
X — Not affected.
N — Set if the most significant bit of the result is set; cleared otherwise.
Z — Set if the result is zero; cleared otherwise.
V — Always cleared.
C — Always cleared.
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
1 1 0 0 REGISTER OPMODE EFFECTIVE ADDRESS
MODE REGISTER
Instruction Fields:
Register field—Specifies any of the eight data registers.
Opmode field
a. If the location specified is a source operand, only data addressing modes can
be used as listed in the following table:
Addressing Register
Addressing Register Mode Mode
Mode Mode
(xxx).W 111 000
Dn 000 reg. number:Dn
(xxx).L 111 001
An — —
#<data> 111 100
(An) 010 reg. number:An
NOTE
The Dn mode is used when the destination is a data register;
the destination < ea > mode is invalid for a data register.
X — Not affected.
N — Set if the most significant bit of the result is set; cleared otherwise.
Z — Set if the result is zero; cleared otherwise.
V — Always cleared.
C — Always cleared.
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 1 0 SIZE EFFECTIVE ADDRESS
MODE REGISTER
Instruction Fields:
Size field—Specifies the size of the operation.
00 — Byte operation
01 — Word operation
10 — Long operation
Effective Address field—Specifies the destination operand. Only data alterable
addressing modes can be used as listed in the following table:
Addressing Register
Addressing Register Mode Mode
Mode Mode
(xxx).W 111 000
Dn 000 reg. number:Dn
(xxx).L 111 001
An — —
#<data> — —
(An) 010 reg. number:An
Assembler
Syntax: ANDI # < data > ,CCR
Description: Performs an AND operation of the immediate operand with the condition
codes and stores the result in the low-order byte of the status register.
Condition Codes:
XNZVC
* * * * *
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 1 0 0 0 1 1 1 1 0 0
Assembler
Syntax: ANDI # < data >,SR
Description: Performs an AND operation of the immediate operand with the status
register and stores the result in the status register.
Condition Codes:
XNZVC
* * * * *
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 1 0 0 1 1 1 1 1 0 0
ASL:
For ASR, the operand is shifted right; the number of positions shifted is the shift
count. Bits shifted out of the low-order bit go to both the carry and the extend bits; the
sign bit (MSB) is shifted into the high-order bit.
MSB ASR:
OPERAND C X
Condition Codes:
XNZVC
* * * * *
X — Set according to the last bit shifted out of the operand; unaffected for a shift
count of zero.
N — Set if the most significant bit of the result is set; cleared otherwise.
Z — Set if the result is zero; cleared otherwise.
V — Set if the most significant bit is changed at any time during the shift operation;
cleared otherwise.
C — Set according to the last bit shifted out of the operand; cleared for a shift count
of zero.
(d8,PC,Xn) — —
(d8,An,Xn) 110 reg. number:An
Addressing Register
Assembler
Then PC + dn → PC
Syntax: Bcc < label >
GE Greater or MI Minus
HI High PL Plus
VS Overflow Set
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 1 1 0 CONDITION 8-BIT DISPLACEMENT
Instruction Fields:
Condition field—The binary code for one of the conditions listed in the table.
8-Bit Displacement field—Twos complement integer specifying the number of bytes
between the branch instruction and the next instruction to be executed if the
condition is met.
16-Bit Displacement field—Used for the displacement when the 8-bit displacement
field contains $00.
NOTE
A branch to the immediately following instruction automatically
uses the 16-bit displacement format because the 8-bit
displacement field contains $00 (zero offset).
X — Not affected.
N — Not affected.
Z — Set if the bit tested is zero; cleared otherwise.
V — Not affected.
C — Not affected.
Instruction Format (Bit Number Dynamic, specified in a register):
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 REGISTER 1 0 1 EFFECTIVE ADDRESS
MODE REGISTER
0 0 0 0 0 0 0 0 BIT NUMBER
(d16,PC) — —
X — Not affected.
N — Not affected.
Z — Set if the bit tested is zero; cleared otherwise.
V — Not affected.
C — Not affected.
BCLR Test a Bit and Clear BCLR Instruction Format (Bit Number
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 1 0 0 0 1 0 EFFECTIVE ADDRESS
MODE REGISTER
0 0 0 0 0 0 0 0 BIT NUMBER
Condition Codes:
Not affected.
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 1 1 0 0 0 0 0 8-BIT DISPLACEMENT
Instruction Fields:
8-Bit Displacement field—Twos complement integer specifying the number of bytes
between the branch instruction and the next instruction to be executed.
NOTE
A branch to the immediately following instruction automatically
uses the 16-bit displacement format because the 8-bit
displacement field contains $00 (zero offset).
BSET Test a Bit and Set BSET
Operation: TEST ( < bit number > of Destination) → Z; 1 → < bit number > of Des tination
Description: Tests a bit in the destination operand and sets the Z condition code
appropriately, then sets the specified bit in the destination operand. When a data
register is the destination, any of the 32 bits can be specified by a modulo 32-bit
number. When a memory location is the destination, the operation is a byte
operation, and the bit number is modulo 8. In all cases, bit zero refers to the least
significant bit. The bit number for this operation can be specified in either of two
ways:
1. Immediate—The bit number is specified in the second word of the instruction.
2. Register—The specified data register contains the bit number.
Condition Codes:
XNZVC
— — ∗ — —
X — Not affected.
N — Not affected.
Z — Set if the bit tested is zero; cleared otherwise.
V — Not affected.
C — Not affected.
0 0 0 0 0 0 0 BIT NUMBER
Description: Pushes the long-word address of the instruction immediately following the
BSR instruction onto the system stack. The program counter contains the address of
the instruction word plus two. Program execution then continues at location (PC) +
displacement. The displacement is a twos complement integer that represents the
relative distance in bytes from the current program counter to the destination
program counter. If the 8-bit displacement field in the instruction word is zero, a 16-bit
displacement (the word immediately following the instruction) is used.
Condition Codes:
Not affected.
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 1 1 0 0 0 0 1 8-BIT DISPLACEMENT
Instruction Fields:
8-Bit Displacement field—Twos complement integer specifying the number of bytes
between the branch instruction and the next instruction to be executed.
NOTE
A branch to the immediately following instruction automatically
uses the 16-bit displacement format because the 8-bit
displacement field contains $00 (zero offset).
Description: Tests a bit in the destination operand and sets the Z condition code
appropriately. When a data register is the destination, any of the 32 bits can be
specified by a modulo 32- bit number. When a memory location is the destination, the
operation is a byte operation, and the bit number is modulo 8. In all cases, bit zero
refers to the least significant bit. The bit number for this operation can be specified in
either of two ways:
1. Immediate—The bit number is specified in a second word of the instruction.
2. Register—The specified data register contains the bit number.
Condition Codes:
XNZVC
— — ∗ — —
X — Not affected.
N — Not affected.
Z — Set if the bit tested is zero; cleared otherwise.
V — Not affected.
C — Not affected.
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 REGISTER 1 0 0 EFFECTIVE ADDRESS
MODE REGISTER
0 0 0 0 0 0 0 0 BIT NUMBER
X — Not affected.
N — Set if Dn < 0; cleared if Dn > effective address operand; undefined otherwise.
Z — Undefined.
V — Undefined.
C — Undefined.
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 1 0 0 REGISTER SIZE 0 EFFECTIVE ADDRESS
MODE REGISTER
Instruction Fields:
Register field—Specifies the data register that contains the value to be checked.
Size field—Specifies the size of the operation.
11— Word operation
10— Long operation
Effective Address field—Specifies the upper bound operand. Only data addressing
modes can be used as listed in the following table:
Addressing Register
Addressing Register Mode Mode
Mode Mode
(xxx).W 111 000
Dn 000 reg. number:Dn
(xxx).L 111 001
An — —
#<data> 111 100
(An) 010 reg. number:An
X — Not affected.
N — Always cleared.
Z — Always set.
V — Always cleared.
C — Always cleared.
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 1 0 0 0 0 1 0 SIZE EFFECTIVE ADDRESS
MODE REGISTER
Instruction Fields:
Size field—Specifies the size of the operation.
00— Byte operation
01— Word operation
10— Long operation
An — —
NOTE
(An) 010 reg. number:An Addressing Register
Mode Mode
(An) + 011 reg. number:An
(xxx).W 111 000
– (An) 100 reg. number:An
(xxx).L 111 001
#<data> — — (d8,PC,Xn) — —
(d16,PC) — —
X — Not affected.
N — Set if the result is negative; cleared otherwise.
Z — Set if the result is zero; cleared otherwise.
V — Set if an overflow occurs; cleared otherwise.
C — Set if a borrow occurs; cleared otherwise.
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
1 0 1 1 REGISTER OPMODE EFFECTIVE ADDRESS
MODE REGISTER
Instruction Fields:
Register field—Specifies the destination data register.
Opmode field
Byte Word Long Operation
000 001 010 Dn – < ea >
Effective Address field—Specifies the source operand. All addressing modes can be
used as listed in the following table:
Mode Mode
Addressing Register
Dn 000 reg. number:Dn Mode Mode
X — Not affected.
N — Set if the result is negative; cleared otherwise.
Z — Set if the result is zero; cleared otherwise.
V — Set if an overflow is generated; cleared otherwise.
C — Set if a borrow is generated; cleared otherwise.
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
1 0 1 1 REGISTER OPMODE EFFECTIVE ADDRESS
MODE REGISTER
Instruction Fields:
Register field—Specifies the destination address register.
Opmode field—Specifies the size of the operation.
011— Word operation; the source operand is sign-extended to a long operand,
and the operation is performed on the address register using all 32 bits.
111— Long operation.
Effective Address field—Specifies the source operand. All addressing modes can be
used as listed in the following table:
Addressing Register
Addressing Register Mode Mode
Mode Mode
(xxx).W 111 000
Dn 000 reg. number:Dn
(xxx).L 111 001
An 001 reg. number:An
#<data> 111 100
(An) 010 reg. number:An
X — Not affected.
N — Set if the result is negative; cleared otherwise.
Z — Set if the result is zero; cleared otherwise.
V — Set if an overflow occurs; cleared otherwise.
C — Set if a borrow occurs; cleared otherwise.
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 1 1 0 0 SIZE EFFECTIVE ADDRESS
MODE REGISTER
Instruction Fields:
Size field—Specifies the size of the operation.
00 — Byte operation
01 — Word operation
10 — Long operation
Effective Address field—Specifies the destination operand. Only data addressing
modes can be used as listed in the following table:
Addressing Register
Addressing Register Mode Mode
Mode Mode
(xxx).W 111 000
Dn 000 reg. number:Dn
(xxx).L 111 001
An — —
#<data> — —
(An) 010 reg. number:An
Assembler
Syntax: CMPM (Ay) + ,(Ax) +
Condition Codes:
XNZVC
— ∗ ∗ ∗ ∗
X — Not affected.
N — Set if the result is negative; cleared otherwise.
Z — Set if the result is zero; cleared otherwise.
V — Set if an overflow is generated; cleared otherwise.
C — Set if a borrow is generated; cleared otherwise.
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
1 0 1 1 REGISTER Ax 1 SIZE 0 0 1 REGISTER Ay
Instruction Fields:
Register Ax field—(always the destination) Specifies an address register in the
postincrement addressing mode.
Assembler
Syntax: DBcc Dn, < label >
Description: Controls a loop of instructions. The parameters are a condition code, a data
register (counter), and a displacement value. The instruction first tests the condition
for termination; if it is true, no operation is performed. If the termination condition is
not true, the low-order 16 bits of the counter data register decrement by one. If the
result is – 1, execution continues with the next instruction. If the result is not equal to
– 1, execution continues at the location indicated by the current value of the program
counter plus the sign-extended 16-bit displacement. The value in the program
counter is the address of the instruction word of the DBcc instruction plus two. The
displacement is a twos complement integer that represents the relative distance in
bytes from the current program counter to the destination program counter. Condition
code cc specifies one of the following conditional tests (refer to Table 3-19 for more
information on these conditional tests):
Not affected.
Mnemonic Conditi Mnemonic Condition
CC(HI) Carry Cl LS Low or Same
CS(LO) Carry S LT Less Than
EQ Equa MI Minus
F False NE Not Equal
GE Greater or PL Plus
GT Greater T T True
HI High VC Overflow Clear
LE Less or E VS Overflow Set
Condition Codes:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 1 0 1 CONDITION 1 1 0 0 1 REGISTER
16-BIT DISPLACEMENT
Instruction Fields:
Condition field—The binary code for one of the conditions listed in the table.
NOTE
The terminating condition is similar to the UNTIL loop clauses of
high-level languages. For example: DBMI can be stated as
"decrement and branch until minus".
Most assemblers accept DBRA for DBF for use when only a
count terminates the loop (no condition is tested).
Description: Divides the signed destination operand by the signed source operand and
stores the signed result in the destination. The instruction divides a long word by a
word. The result is a quotient in the lower word (least significant 16 bits) and the
remainder in the upper word (most significant 16 bits) of the result. The sign of the
remainder is the same as the sign of the dividend.
Condition Codes:
XNZVC
— ∗ ∗ ∗ 0
X—Not affected.
N — Set if the quotient is negative; cleared otherwise; undefined if overflow or
divide by zero occurs.
Z — Set if the quotient is zero; cleared otherwise; undefined if overflow or divide by
zero occurs.
V — Set if division overflow occurs; undefined if divide by zero occurs; cleared oth
erwise.
C — Always cleared.
Instruction Fields:
Register field—Specifies any of the eight data registers. This field always specifies
the destination operand.
Effective Address field—Specifies the source operand. Only data addressing modes
are allowed as shown:
Addressing Register
Addressing Register Mode Mode
Mode Mode
(xxx).W 111 000
Dn 000 reg. number:Dn
(xxx).L 111 001
An — —
#<data> 111 100
(An) 010 reg. number:An
NOTE
Overflow occurs if the quotient is larger than a 16-bit signed integer. The
instruction checks for overflow at the start of execution. If the upper word of
the dividend is greater than or equal to the divisor, the overflow bit is set, and
the instruction terminates with the operands unchanged.
Description: Divides the unsigned destination operand by the unsigned source operand
and stores the unsigned result in the destination. The instruction divides a long word by a
word. The result is a quotient in the lower word (least significant 16bits) and the remainder
is in the upper word (most significant 16 bits) of the result.
Condition Codes:
XNZVC
— ∗ ∗ ∗ 0
X — Not affected.
N — Set if the quotient is negative; cleared otherwise; undefined if overflow or
divide by zero occurs.
Z — Set if the quotient is zero; cleared otherwise; undefined if overflow or divide by
zero occurs.
V — Set if division overflow occurs; cleared otherwise; undefined if divide by zero
occurs.
C — Always cleared.
Instruction Fields:
Register field—Specifies any of the eight data registers; this field always specifies the
destination operand.
Effective Address field—Specifies the source operand. Only data addressing modes
are allowed as shown:
Addressing Register Addressing Register
Mode Mode Mode Mode
NOTE
Overflow occurs if the quotient is larger than a 16-bit signed integer. The
instruction checks for overflow at the start of execution. If the upper word of
the dividend is greater than or equal to the divisor, the overflow bit is set,
and the instruction terminates with the operands unchanged.
X — Not affected.
N — Set if the most significant bit of the result is set; cleared otherwise.
Z — Set if the result is zero; cleared otherwise.
V — Always cleared.
C — Always cleared.
Instruction Format (word form):
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
1 0 1 1 REGISTER OPMODE EFFECTIVE ADDRESS
MODE REGISTER
Instruction Fields:
Register field—Specifies any of the eight data registers.
Opmode field
Byte Word Long Operation
100 101 110 < ea > ⊕ Dn → < ea >
Effective Address field—Specifies the destination operand. Only data
addressing can be used as listed in the following table:
Addressing Register
Addressing Register Mode Mode
Mode Mode
(xxx).W 111 000
Dn 000 reg. number:Dn
(xxx).L 111 001
An — —
#<data> — —
(An) 010 reg. number:An
NOTE
Memory-to-data-register operations are not allowed. Most
assemblers use EORI when the source is immediate data.
X — Not affected.
N — Set if the most significant bit of the result is set; cleared otherwise.
Z — Set if the result is zero; cleared otherwise.
V — Always cleared.
C — Always cleared.
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 1 0 1 0 SIZE EFFECTIVE ADDRESS
MODE REGISTER
Instruction Fields:
Size field—Specifies the size of the operation.
00— Byte operation
01— Word operation
10— Long operation
Effective Address field—Specifies the destination operand. Only data alterable
addressing modes can be used as listed in the following table:
Addressing Register
Addressing Register Mode Mode
Mode Mode
(xxx).W 111 000
Dn 000 reg. number:Dn
(xxx).L 111 001
An — —
#<data> — —
(An) 010 reg. number:An
Description: Performs an exclusive-OR operation on the condition code register using the
immediate operand and stores the result in the condition code register (low-order
byte of the status register). All implemented bits of the condition code register are
affected.
Condition Codes:
XNZVC
∗ ∗ ∗ ∗ ∗
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 1 0 1 0 0 0 1 1 1 1 0 0
Operation: Source ⊕ SR → SR
Assembler
Syntax: EORI # < data > ,SR
Condition Codes:
XNZVC
∗ ∗ ∗ ∗ ∗
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 1 0 1 0 0 1 1 1 1 1 0 0
Description: Exchanges the contents of two 32-bit registers. The instruction performs
three types of exchanges.
1. Exchange data registers.
2. Exchange address registers.
3. Exchange a data register and an address register.
Condition Codes:
Not affected.
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
1 1 0 0 REGISTER Rx 1 OPMODE REGISTER Ry
Instruction Fields:
Register Rx field—Specifies either a data register or an address register depending
on the mode. If the exchange is between data and address registers, this field
always specifies the data register.
Condition Codes:
XNZVC
— ∗ ∗ 0 0
X — Not affected.
N — Set if the result is negative; cleared otherwise.
Z — Set if the result is zero; cleared otherwise.
V — Always cleared.
C — Always cleared.
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 1 0 0 1 0 0 OPMODE 0 0 0 REGISTER
Instruction Fields:
Opmode field—Specifies the size of the sign-extension operation.
010—Sign-extend low-order byte of data register to word.
011— Sign-extend low-order word of data register to long.
Register field—Specifies the data register is to be sign-extended.
Assembler
Syntax: ILLEGAL
Attributes: Unsized
Description: Forces an illegal instruction exception, vector number 4. All other illegal
instruction bit patterns are reserved for future extension of the instruction set and
should not be used to force an exception.
Condition Codes:
Not affected.
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 1 0 0 1 0 1 0 1 1 1 1 1 1 0 0
Assembler
Syntax: JMP < ea >
Attributes: Unsized
Condition Codes:
Not affected.
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 1 0 0 1 1 1 0 1 1 EFFECTIVE ADDRESS
MODE REGISTER
Instruction Field:
Effective Address field—Specifies the address of the next instruction. Only control
addressing modes can be used as listed in the following table:
Addressing Register
Addressing Register Mode Mode
Mode Mode
(xxx).W 111 000
Dn — —
(xxx).L 111 001
An — —
#<data> — —
(An) 010 reg. number:An
(An) + — —
– (An) — —
(d16,PC) 111 010
(d16,An) 101 reg. number:An
(d8,PC,Xn) 111 011
(d8,An,Xn) 110 reg. number:An
Assembler
Syntax: JSR < ea >
Attributes: Unsized
Description: Pushes the long-word address of the instruction immediately following the
JSR instruction onto the system stack. Program execution then continues at the
address specified in the instruction.
Condition Codes:
Not affected.
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 1 0 0 1 1 1 0 1 0 EFFECTIVE ADDRESS
MODE REGISTER
Instruction Field:
Effective Address field—Specifies the address of the next instruction. Only control
addressing modes can be used as listed in the following table:
Addressing Register
Mode Mode
Dn — — (xxx).W 111 000
(An) + — —
– (An) — —
Addressing Register
Mode Mode
Assembler
Syntax: LEA < ea > ,An
Description: Loads the effective address into the specified address register. All 32 bits of
the address register are affected by this instruction.
Condition Codes:
Not affected.
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 1 0 0 REGISTER 1 1 1 EFFECTIVE ADDRESS
MODE REGISTER
Instruction Fields:
Register field—Specifies the address register to be updated with the effective address.
Effective Address field—Specifies the address to be loaded into the address register.
Only control addressing modes can be used as listed in the following table:
An — —
Addressing Register (An) 010 reg. number:An
Mode Mode
(An) + — —
Dn — —
– (An) — — #<data> — —
Description: Pushes the contents of the specified address register onto the stack. Then
loads the updated stack pointer into the address register. Finally, adds the
displacement value to the stack pointer. The address register occupies one long
word on the stack. The user should specify a negative displacement in order to
allocate stack area.
Condition Codes:
Not affected.
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 1 0 0 1 1 1 0 0 1 0 1 0 REGISTER
WORD DISPLACEMENT
Instruction Fields:
Register field—Specifies the address register for the link.
NOTE
LINK and UNLK can be used to maintain a linked list of local data
and parameter areas on the stack for nested subroutine calls.
LSL:
The LSR instruction shifts the operand to the right the number of positions specified
as the shift count. Bits shifted out of the low-order bit go to both the carry and the
extend bits; zeros are shifted into the high-order bit. .
O OPERAND C
LSR:
X
Condition Codes:
XNZVC
∗ ∗ ∗ 0 ∗
X — Set according to the last bit shifted out of the operand; unaffected for a shift
count of zero.
N — Set if the result is negative; cleared otherwise.
Z — Set if the result is zero; cleared otherwise.
V — Always cleared.
C — Set according to the last bit shifted out of the operand; cleared for a shift count
of zero.
(d16,PC) — —
Addressing Register
Mode Mode — —
(d8,PC,Xn)
(xxx).W 111 000
#<data> — —
Assembler
Syntax: MOVE < ea > , < ea >
Description: Moves the data at the source to the destination location and sets the
condition codes according to the data. The size of the operation may be specified as
byte, word, or long. Condition Codes:
XNZVC
— ∗ ∗ 0 0
X — Not affected.
N — Set if the result is negative; cleared otherwise.
Z — Set if the result is zero; cleared otherwise.
V — Always cleared.
C — Always cleared.
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 SIZE DESTINATION SOURCE
REGISTER MODE MODE REGISTER
Instruction Fields:
Size field—Specifies the size of the operand to be moved.
01 — Byte operation
11 — Word operation
10 — Long operation
MOVE Move Data from Source to Destination MOVE
Destination Effective Address field—Specifies the destination location. Only data
alterable addressing modes can be used as listed in the following table:
Addressing Register
Addressing Register Mode Mode
Mode Mode
(xxx).W 111 000
Dn 000 reg. number:Dn
(xxx).L 111 001
An — —
#<data> — —
(An) 010 reg. number:An
Source Effective Address field—Specifies the source operand. All addressing modes
can be used as listed in the following table:
Addressing Register
Addressing Register Mode Mode
Mode Mode
(xxx).W 111 000
Dn 000 reg. number:Dn
(xxx).L 111 001
An* 001 reg. number:An
#<data> 111 100
(An) 010 reg. number:An
NOTE
Most assemblers use MOVEA when the destination is an
address register.
Instruction Fields:
Size field—Specifies the size of the operand to be moved.
11 — Word operation; the source operand is sign-extended to a long operand and
all 32 bits are loaded into the address register.
10 — Long operation.
Effective Address field—Specifies the location of the source operand. All addressing
modes can be used as listed in the following table:
Addressing Register
Addressing Register Mode Mode
Mode Mode
(xxx).W 111 000
Dn 000 reg. number:Dn
(xxx).L 111 001
An 001 reg. number:An
#<data> 111 100
(An) 010 reg. number:An
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 1 0 0 0 1 0 0 1 1 EFFECTIVE ADDRESS
MODE REGISTER
Instruction Field:
Effective Address field—Specifies the location of the source operand. Only data
addressing modes can be used as listed in the following table:
(d8,An,Xn) 110 reg. number:An
Addressing Register
Mode Mode
Assembler
Syntax: MOVE SR, < ea >
Description: Moves the data in the status register to the destination location. The
destination is word length. Unimplemented bits are read as zeros.
Condition Codes:
Not affected.
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 1 0 0 0 0 0 0 1 1 EFFECTIVE ADDRESS
MODE REGISTER
Instruction Fields:
Effective Address field—Specifies the destination location. Only data alterable
addressing modes can be used as listed in the following table:
(d8,An,Xn) 110 reg. number:An
Addressing Register
Mode Mode
(d8,PC,Xn) — —
Operation: Source → SR
Assembler
Syntax: MOVE < ea > ,SR
Attributes: Size = (Word)
Description: Moves the data in the source operand to the condition code register. The
The source operand is a word and all implemented bits of the status register are
affected.
Condition Codes:
XNZVC
∗ ∗ ∗ ∗ ∗
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 1 0 0 0 1 1 0 1 1 EFFECTIVE ADDRESS
MODE REGISTER
Instruction Field:
Effective Address field—Specifies the location of the source operand. Only data
addressing modes can be used as listed in the following table:
(An) + 011 reg. number:An
Addressing Register – (An) 100 reg. number:An
Mode Mode
(d16,An) 101 reg. number:An
Dn 000 reg. number:Dn
Description: Moves the contents of the user stack pointer to or from the specified
address register.
Condition Codes:
Not affected.
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 1 0 0 1 1 1 0 0 1 1 0 dr REGISTER
Instruction Fields:
dr field—Specifies the direction of transfer.
0—Transfer the address register to the user stack pointer.
1—Transfer the user stack pointer to the address register.
(An) + — —
– (An) — —
(d16,PC) 111 010
(d16,An) 101 reg. number:An
(d8,PC,Xn) 111 011
(d8,An,Xn) 110 reg. number:An
Register List Mask field—Specifies the registers to be transferred. The low-order bit
corresponds to the first register to be transferred; the high-order bit corresponds
to the last register to be transferred. Thus, for both control modes and
postincrement mode addresses, the mask correspondence is:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
A7 A6 A5 A4 A3 A2 A1 A0 D7 D6 D5 D4 D3 D2 D1 D0
MID UPPER
MID LOWER
LOW ORDER
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 DATA REGISTER OPMODE 0 0 1 ADDRESS
REGISTER
16-BIT DISPLACEMENT
Instruction Fields:
Data Register field—Specifies the data register for the instruction.
Opmode field—Specifies the direction and size of the operation.
100—Transfer word from memory to register.
101—Transfer long from memory to register.
110— Transfer word from register to memory.
111— Transfer long from register to memory.
Address Register field—Specifies the address register which is used in the address
register indirect plus displacement addressing mode.
Displacement field—Specifies the displacement used in the operand address.
Assembler
Syntax: MOVEQ # < data > ,Dn
Description: Moves a byte of immediate data to a 32-bit data register. The data in an 8-bit
field within the operation word is sign- extended to a long operand in the data register
as it is transferred.
Condition Codes:
XNZVC
— ∗ ∗ 0 0
X — Not affected.
N — Set if the result is negative; cleared otherwise.
Z — Set if the result is zero; cleared otherwise.
V — Always cleared.
C — Always cleared.
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 1 1 1 REGISTER 0 DATA
Instruction Fields:
Register field—Specifies the data register to be loaded.
X — Not affected.
N — Set if the result is negative; cleared otherwise.
Z — Set if the result is zero; cleared otherwise.
V — Set if overflow; cleared otherwise.
C — Always cleared.
Instruction Fields:
Register field—Specifies a data register as the destination.
Effective Address field—Specifies the source operand. Only data addressing modes
can be used as listed in the following table:
Dn 000 reg. number:Dn
Addressing Register An — —
Mode Mode
(An) 010 reg. number:An
(An) + 011 reg. number:An (xxx).L 111 001
X — Not affected.
N — Set if the result is negative; cleared otherwise.
Z — Set if the result is zero; cleared otherwise.
V — Set if overflow; cleared otherwise.
C — Always cleared.
Instruction Format (word form):
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
1 1 0 0 REGISTER 0 1 1 EFFECTIVE ADDRESS
MODE REGISTER
Instruction Fields:
Register field—Specifies a data register as the destination.
Effective Address field—Specifies the source operand. Only data addressing modes
can be used as listed in the following table:
Addressing Register
Addressing Register Mode Mode
Mode Mode
(xxx).W 111 000
Dn 000 reg. number:Dn
(xxx).L 111 001
An — —
#<data> 111 100
(An) 010 reg. number:An
Instruction Fields:
Register field—Specifies a data register as the destination.
Effective Address field—Specifies the source operand. Only data addressing modes
can be used as listed in the following table:
Addressing Register
Addressing Register Mode Mode
Mode Mode
(xxx).W 111 000
Dn 000 reg. number:Dn
(xxx).L 111 001
An — —
#<data> 111 100
(An) 010 reg. number:An
Instruction Fields:
Size field—Specifies the size of the operation.
00 — Byte operation
01 — Word operation
10 — Long operation
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 1 0 0 0 0 0 0 SIZE EFFECTIVE ADDRESS
MODE REGISTER
Instruction Fields:
Size field—Specifies the size of the operation.
00 — Byte operation
01 — Word operation
10 — Long operation
Effective Address field—Specifies the destination operand. Only data alterable
addressing modes can be used as listed in the following table:
Addressing Register
Addressing Register Mode Mode
Mode Mode
(xxx).W 111 000
Dn 000 reg. number:Dn
(xxx).L 111 001
An — —
#<data> — —
(An) 010 reg. number:An
Assembler
Syntax: NOP
Attributes: Unsized
Description: Performs no operation. The processor state, other than the program
counter, is unaffected. Execution continues with the instruction following the NOP
instruction.
Condition Codes:
Not affected.
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 1 0 0 1 1 1 0 0 1 1 1 0 0 0 1
X — Not affected.
N — Set if the result is negative; cleared otherwise.
Z — Set if the result is zero; cleared otherwise.
V — Always cleared.
C — Always cleared.
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 1 0 0 0 1 1 0 SIZE EFFECTIVE ADDRESS
MODE REGISTER
Instruction Fields:
Size field—Specifies the size of the operation.
00— Byte operation
01— Word operation
10— Long operation
Effective Address field—Specifies the destination operand. Only data alterable
addressing modes can be used as listed in the following table:
Addressing Register
Addressing Register Mode Mode
Mode Mode
(xxx).W 111 000
Dn 000 reg. number:Dn
(xxx).L 111 001
An — —
#<data> — —
(An) 010 reg. number:An
OR Inclusive OR Logical OR
Operation: Source V Destination → Destination
Condition Codes:
XNZVC
— ∗ ∗ 0 0
X — Not affected.
N — Set if the most significant bit of the result is set; cleared otherwise.
Z — Set if the result is zero; cleared otherwise.
V — Always cleared.
C — Always cleared.
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
1 0 0 0 REGISTER OPMODE EFFECTIVE ADDRESS
MODE REGISTER
Instruction Fields:
Register field—Specifies any of the eight data registers.
Opmode field
OR Inclusive OR Logical OR
Effective Address field—If the location specified is a source operand, only data
addressing modes can be used as listed in the following table:
Addressing Register
Addressing Register Mode Mode
Mode Mode
(xxx).W 111 000
Dn 000 reg. number:Dn
(xxx).L 111 001
An — —
#<data> 111 100
(An) 010 reg. number:An
(d16,PC) — —
— —
NOTE (d8,PC,Xn)
Addressing Register
Mode Mode
Destination
Assembler
Syntax: ORI # < data > , < ea >
Attributes: Size = (Byte, Word, Long)
Description: Performs an inclusive-OR operation on the immediate data and the
destination operand and stores the result in the destination location. The size of the
operation is specified as byte, word, or long. The size of the immediate data matches
the operation size.
Condition Codes:
XNZVC
— ∗ ∗ 0 0
X — Not affected.
N — Set if the most significant bit of the result is set; cleared otherwise.
Z — Set if the result is zero; cleared otherwise.
V — Always cleared.
C — Always cleared.
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 SIZE EFFECTIVE ADDRESS
MODE REGISTER
Assembler
Syntax: ORI # < data > ,CCR
Condition Codes:
XNZVC
∗ ∗ ∗ ∗ ∗
X — Set if bit 4 of immediate operand is one; unchanged otherwise.
N — Set if bit 3 of immediate operand is one; unchanged otherwise.
Z — Set if bit 2 of immediate operand is one; unchanged otherwise.
V — Set if bit 1 of immediate operand is one; unchanged otherwise.
C — Set if bit 0 of immediate operand is one; unchanged otherwise.
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0
Assembler
Syntax: ORI # < data > ,SR
Condition Codes:
XNZVC
∗ ∗ ∗ ∗ ∗
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0
Assembler
Syntax: PEA < ea >
Description: Computes the effective address and pushes it onto the stack. The effective
address is a long address.
Condition Codes:
Not affected.
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 1 0 0 1 0 0 0 0 1 EFFECTIVE ADDRESS
MODE REGISTER
Instruction Field:
Effective Address field—Specifies the address to be pushed onto the stack. Only
control addressing modes can be used as listed in the following table:
(An) + — —
– (An) — —
Assembler
Syntax: RESET
Attributes: Unsized
Description: Asserts the RESET signal for 124 clock periods, resetting all external
external devices. The processor state, other than the program counter, is
unaffected and execution continues with the next instruction.
Condition Codes:
Not affected.
Instruction Format:
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 1 0 0 1 1 1 0 0 1 1 1 0 0 0 0
C OPERAND
The ROR instruction rotates the bits of the operand to the right; the rotate count deter
mines the number of bit positions rotated. Bits rotated out of the low-order bit go to
the carry bit and also back into the high-order bit.
.
ROR:
OPERAND C
Condition Codes:
XNZVC
— ∗ ∗ 0 ∗
X — Not affected.
N — Set if the most significant bit of the result is set; cleared otherwise.
Z — Set if the result is zero; cleared otherwise.
V — Always cleared.
C — Set according to the last bit rotated out of the operand; cleared when the
rotate count is zero.
Instruction Format (Register Rotate):
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
1 1 1 0 COUNT/ dr SIZE i/r 1 1 REGISTER
REGISTER