Docsity

manuale motorola 68000, Schemi e mappe concettuali di Architettura Dei Calcolatori

Toggle sidebar
bg1
MC68000 and MC68EC000 Instruction Set Summary
Mnemonic Description
ABCD
ADD
ADDA
ADDI
ADD
Q
ADDX
AND
ANDI
ANDI to CCR
ANDI to SR
ASL, ASR
Add Decimal with
Extend Add
Add Address
Add
Immediate
Add Quick
Add with Extend
Logical AND
Logical AND Immediate
AND Immediate to Condition Code
Register AND Immediate to Status
Register Arithmetic Shift Left and
Right
Bcc
BCHG
BCLR
BRA
BSET
BSR
BTST
Branch
Conditionally Test
Bit and Change
Test Bit and Clear
Branch
Test Bit and Set
Branch to
Subroutine
Test Bit
CHK
CLR
CMP
CMPA
CMPI
CMPM
Check Register Against Bound
Clear
Compare
Compare
Address
Compare Immediate
Compare Memory to Memory
DBc
c
DIVS
DIVU
Test Condition, Decrement, and
Branch Signed Divide
Unsigned Divide
EOR
EORI
EORI to CCR
EORI to SR
EXG
EXT
Logical Exclusive-OR
Logical Exclusive-OR Immediate
Exclusive-OR Immediate to Condition Code
Register Exclusive-OR Immediate to Status
Register Exchange Registers
Sign Extend
ILLEGAL Take Illegal Instruction Trap
JMP
JSR
Jump
Jump to Subroutine
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Anteprima parziale del testo

Scarica manuale motorola 68000 e più Schemi e mappe concettuali in PDF di Architettura Dei Calcolatori solo su Docsity!

MC68000 and MC68EC000 Instruction Set Summary Mnemonic Description ABCD ADD ADDA ADDI ADD Q ADDX AND ANDI ANDI to CCR ANDI to SR ASL, ASR Add Decimal with Extend Add Add Address Add Immediate Add Quick Add with Extend Logical AND Logical AND Immediate AND Immediate to Condition Code Register AND Immediate to Status Register Arithmetic Shift Left and Right Bcc BCHG BCLR BRA BSET BSR BTST Branch Conditionally Test Bit and Change Test Bit and Clear Branch Test Bit and Set Branch to Subroutine Test Bit CHK CLR CMP CMPA CMPI CMPM Check Register Against Bound Clear Compare Compare Address Compare Immediate Compare Memory to Memory DBc c DIVS DIVU Test Condition, Decrement, and Branch Signed Divide Unsigned Divide EOR EORI EORI to CCR EORI to SR EXG EXT Logical Exclusive-OR Logical Exclusive-OR Immediate Exclusive-OR Immediate to Condition Code Register Exclusive-OR Immediate to Status Register Exchange Registers Sign Extend ILLEGAL Take Illegal Instruction Trap JMP JSR Jump Jump to Subroutine

MC68000 and MC68EC000 Instruction Set Summary (Continued) Mnemonic Description LEA LINK LSL, LSR Load Effective Address Link and Allocate Logical Shift Left and Right MOVE MOVEA MOVE to CCR MOVE from SR MOVE to SR MOVE USP MOVEM MOVEP MOVEQ MULS MULU Move Move Address Move to Condition Code Register Move from Status Register Move to Status Register Move User Stack Pointer Move Multiple Registers Move Peripheral Move Quick Signed Multiply Unsigned Multiply NBCD NEG NEGX NOP NOT Negate Decimal with Extend Negate Negate with Extend No Operation Logical Complement OR ORI ORI to CCR ORI to SR Logical Inclusive-OR Logical Inclusive-OR Immediate Inclusive-OR Immediate to Condition Code Register Inclusive-OR Immediate to Status Register PEA Push Effective Address RESET ROL, ROR ROXL, ROXR RTE RTR RTS Reset External Devices Rotate Left and Right Rotate with Extend Left and Right Return from Exception Return and Restore Return from Subroutine SBCD Scc STOP SUB SUBA SUBI SUBQ SUBX SWAP Subtract Decimal with Extend Set Conditionally Stop Subtra ct Subtract Address Subtract Immediate Subtract Quick Subtract with Extend Swap Register Words

Operands and Notational Conventions

Operands An Any Address Register n (example: A3 is address register 3) Dn Any Data Register n (example: D5 is data register 5) Rn Any data or address registerData register D7–D0, used during compare. PC Program counter SR Status register CCR Condition codes register (low order byte of SR) SSP Supervisor stack pointer USP User stack pointer SP Active stack pointer (same as A7) X Extend flag of the CCR N Negative flag of the CCR Z Zero flag of the CCR V Overflow flag of the CCR C Carry flag of the CCR Immediate data Immediate data for the instruction d Address displacement Source Source contents Destination Destination contents Vector Location of exception vector ea Any valid effective address Notational Conventions

  • Arithmetic addition or postincrement indicator
  • Arithmetic subtraction or predecrement^ indicator  Arithmetic multiplication  (^) Arithmetic division or conjunction symbol ~ Invert; operand is logically complemented.  Logical AND V Logical OR  Logical exclusive OR  (^) Source operand is moved to destination operand.  Two operands are exchanged.

ABCD Add Decim

INSTRUCTION NAME ASSEMBLER SYNTAX SIZE ATTRIBUTE TEXT DESCRIPTION OF INSTRUCTION OPERATION EFFECTS ON CONDITION CODES INSTRUCTION FORMAT — SPECIFIES THE BIT PATTERN AND FIELDS OF THE "OPCODE" WORD DEFINITIONS AND ALLOWED VALUES FOR THE INSTRUCTION FIELDS Operation: Source10 + Destinat Assembler ABCD Dy,Dx Syntax: ABCD – (Ay), – (Ax) Attributes: Size = (Byte) Description: Adds the source operand to and stores the result in the destinatio coded decimal arithmetic. The op numbers, can be addressed in two

  1. Data Register to Data Regist ters specified in the instructi
  2. Memory to Memory: The op dressing mode using the ad This operation is a byte operation on Condition Codes: X N Z V C
  • U^ * U^ * X — Set the same as the carry bi N — Undefined. Z — Cleared if the result is nonze V — Undefined. C — Set if a decimal carry was g Normally, the Z condition co the start of an operation. results upon completion of Instruction Format: 15 14 13 12 11 10 9 1 1 0 0 REGISTER Rx Instruction Fields: Register Rx field—Specifies the d If R/M = 0, specifies a data reg If R/M = 1, specifies an address R/M field—Specifies the operand 0 — The operation is data regis

ABCD Add Decimal with Extend ABCD

Operation: Source10 + Destination10 + X  Destination Assembler ABCD Dy,Dx Syntax: ABCD – (Ay), – (Ax) Attributes: Size = (Byte) Description: Adds the source operand to the destination operand along with the extend bit, and stores the result in the destination location. The addition is performed using binary- coded decimal arithmetic. The operands, which are packed binary-coded decimal numbers, can be addressed in two different ways:

  1. Data Register to Data Register: The operands are contained in the data regis- ters specified in the instruction.
  2. Memory to Memory: The operands are addressed with the predecrement ad- dressing mode using the address registers specified in the instruction. This operation is a byte operation only. Condition Codes: X N Z V C
  • U^ * U^ * X — Set the same as the carry bit. N — Undefined. Z — Cleared if the result is nonzero; unchanged otherwise. V — Undefined. C — Set if a decimal carry was generated; cleared otherwise. NOTE Normally, the Z condition code bit is set via programming before the start of an operation. This allows successful tests for zero results upon completion of multiple-precision operations. 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.

ABCD Add Decimal with Extend ABCD

If R/M = 0, specifies a data register. If R/M = 1, specifies an address register for the predecrement addressing mode.

ADD Add ADD

Addressing Mode Mode Register Dn 000 reg. number:Dn An* 001 reg. number:An (An) 010 reg. number:An (An) + 011 reg. number:An

  • (An) 100 reg. number:An (d 16 ,An) 101 reg. Addressing Mode Mode Register (xxx).W 111 000 (xxx).L 111 001

111 100

(d 16 ,PC) 111 010 (d 8 ,PC,Xn) 111 011 Addressing Mode Mode Register Dn — — An — — (An) 010 reg. number:An (An) + 011 reg. number:An

  • (An) 100 reg. number:An (d 16 ,An) 101 reg. number:An Addressing Mode Mode Register (xxx).W 111 000 (xxx).L 111 001

— —

(d 16 ,PC) — — (d 8 ,PC,Xn) — — Effective Address field—Determines addressing mode. 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 b. If the location specified is a destination operand, only memory alterable addressing modes can be used as listed in the following table: NOTE The Dn mode is used when the destination is a data register; the destination < ea > mode is invalid for a data register. ADDA is used when the destination is an address register. ADDI and ADDQ are used when the source is immediate data. Most assemblers automatically make this distinction.

ADDA Add Address ADDA

Addressing Mode Mode Register Dn 000 reg. number:Dn An 001 reg. number:An (An) 010 reg. number:An (An) + 011 reg. number:An

  • (An) 100 reg. number:An (d 16 ,An) 101 reg. Addressing Mode Mode Register (xxx).W 111 000 (xxx).L 111 001

111 100

(d 16 ,PC) 111 010 (d 8 ,PC,Xn) 111 011 Operation: Source + Destination  Destination Assembler Syntax: ADDA < ea > , An Attributes: Size = (Word, Long) 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. 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:

ADDI Add Immediate ADDI

immediate word. If size = 01, the data is the entire immediate word. If size = 10, the data is the next two immediate words.

ADDQ Add Quick ADDQ

Addressing Mode Mode Register Dn 000 reg. number:Dn An* 001 reg. number:An (An) 010 reg. number:An (An) + 011 reg. number:An

  • (An) 100 reg. number:An Addressing Mode Mode Register (xxx).W 111 000 (xxx).L 111 001

— —

(d 16 ,PC) — — (d 8 ,PC,Xn) — — Operation: Immediate Data + Destination  Destination Assembler Syntax: ADDQ # < data > , < ea > Attributes: Size = (Byte, Word, Long) Description: Adds an immediate value of one to eight to the operand at the destination location. The size of the operation may be specified as byte, word, or long. Word and long operations are also allowed on the address registers. When adding to address registers, the condition codes are not altered, and the entire destination address register is used regardless of the operation size. Condition Codes: X N Z V C * * * * * X — Set the same as the carry bit. 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 carry occurs; cleared otherwise. The condition codes are not affected when the destination is an address register. Instruction Format: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 1 0 1 DATA 0 SIZE EFFECTIVE ADDRESS MODE REGISTER Instruction Fields: Data field—Three bits of immediate data representing eight values (0 – 7), with the immediate value zero representing a value of eight. Size field—Specifies the size of the operation. 00— Byte operation 01— Word operation 10— Long operation Effective Address field—Specifies the destination location. Only alterable addressing modes can be used as listed in the following table:

ADDX Add Extended ADDX

Operation: Source + Destination + X  Destination Assembler ADDX Dy,Dx Syntax: ADDX – (Ay), – (Ax) Attributes: Size = (Byte, Word, Long) Description: Adds the source operand and the extend bit to the destination operand and stores the result in the destination location. The operands can be addressed in two different ways:

  1. Data register to data register—The data registers specified in the instruction contain the operands.
  2. Memory to memory—The address registers specified in the instruction address the operands using the predecrement addressing mode. The size of the operation can be specified as byte, word, or long. Condition Codes: X N Z V C * * * * * X — Set the same as the carry bit. N — Set if the result is negative; cleared otherwise. Z — Cleared if the result is nonzero; unchanged otherwise. V — Set if an overflow occurs; cleared otherwise. C — Set if a carry is generated; cleared otherwise. NOTE Normally, the Z condition code bit is set via programming before the start of an operation. This allows successful tests for zero results upon completion of multiple-precision operations. 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.

ADDX Add Extended ADDX

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.

AND AND Logical AND

Addressing Mode Mode Register Dn 000 reg. number:Dn An — — (An) 010 reg. number:An (An) + 011 reg. number:An

  • (An) 100 reg. number:An (d 16 ,An) 101 reg. Addressing Mode Mode Register (xxx).W 111 000 (xxx).L 111 001

111 100

(d 16 ,PC) 111 010 (d 8 ,PC,Xn) 111 011 Addressing Mode Mode Register Dn — — An — — (An) 010 reg. number:An (An) + 011 reg. number:An

  • (An) 100 reg. number:An (d 16 ,An) 101 reg. number:An Addressing Mode Mode Register (xxx).W 111 000 (xxx).L 111 001

— —

(d 16 ,PC) — — (d 8 ,PC,Xn) — — Effective Address field—Determines addressing mode. a. If the location specified is a source operand, only data addressing modes can be used as listed in the following table: b. If the location specified is a destination operand, only memory alterable address- ing modes can be used as listed in the following table: NOTE The Dn mode is used when the destination is a data register; the destination < ea > mode is invalid for a data register. Most assemblers use ANDI when the source is immediate data.

Addressing Mode Mode Register Dn 000 reg. number:Dn An — — (An) 010 reg. number:An (An) + 011 reg. number:An

  • (An) 100 reg. number:An (d 16 ,An) 101 reg. Addressing Mode Mode Register (xxx).W 111 000 (xxx).L 111 001

— —

(d 16 ,PC) — — (d 8 ,PC,Xn) — —

ANDI AND Immediate ANDI

Operation: Immediate Data  Destination  Destination Assembler Syntax: ANDI # < data > , < ea > Attributes: Size = (Byte, Word, Long) Description: Performs an AND operation of the immediate data 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 size of the immediate data matches the operation size. Condition Codes: X N Z V C — (^) * * 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 1 0 SIZE EFFECTIVE ADDRESS MODE REGISTER 16-BIT WORD DATA 8-BIT BYTE DATA 32-BIT LONG DATA 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: Immediate field—Data immediately following the instruction. If size = 00, the data is the low-order byte of the