




























































































Studia grazie alle numerose risorse presenti su Docsity
Guadagna punti aiutando altri studenti oppure acquistali con un piano Premium
Questa pagina non è visibile nell’anteprima
Non perderti parti importanti!





























































































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 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
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
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:
If R/M = 0, specifies a data register. If R/M = 1, specifies an address register for the predecrement addressing mode.
Addressing Mode Mode Register Dn 000 reg. number:Dn An* 001 reg. number:An (An) 010 reg. number:An (An) + 011 reg. number:An
(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
(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.
Addressing Mode Mode Register Dn 000 reg. number:Dn An 001 reg. number:An (An) 010 reg. number:An (An) + 011 reg. number:An
(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:
immediate word. If size = 01, the data is the entire immediate word. If size = 10, the data is the next two immediate words.
Addressing Mode Mode Register Dn 000 reg. number:Dn An* 001 reg. number:An (An) 010 reg. number:An (An) + 011 reg. number:An
(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:
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:
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.
Addressing Mode Mode Register Dn 000 reg. number:Dn An — — (An) 010 reg. number:An (An) + 011 reg. number:An
(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
(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
(d 16 ,PC) — — (d 8 ,PC,Xn) — —
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