
- •Revision History
- •List of Sections
- •Table of Contents
- •List of Figures
- •List of Tables
- •Section 1. General Description
- •1.1 Contents
- •1.2 Introduction
- •1.3 Features
- •1.4 Programmable Options
- •1.5 Block Diagram
- •1.6 Pin Assignments
- •1.7 Pin Functions
- •1.7.3.1 Crystal Resonator
- •1.7.3.2 Ceramic Resonator
- •1.7.3.3 External Clock Signal
- •1.7.4 External Reset Pin (RESET)
- •1.7.5 External Interrupt Request Pin (IRQ)
- •1.7.6 Input Capture Pin (TCAP)
- •1.7.7 Output Compare Pin (TCMP)
- •1.7.8 Port A I/O Pins (PA7–PA0)
- •1.7.9 Port B I/O Pins (PB7–PB0)
- •1.7.10 Port C I/O Pins (PC7–PC0)
- •1.7.11 Port D I/O Pins (PD7 and PD5–PD0)
- •Section 2. Memory
- •2.1 Contents
- •2.2 Introduction
- •2.3 Memory Map
- •2.4 Input/Output (I/O)
- •2.6 EPROM/OTPROM (PROM)
- •2.7 Bootloader ROM
- •Section 3. Central Processor Unit (CPU)
- •3.1 Contents
- •3.2 Introduction
- •3.3 CPU Registers
- •3.3.1 Accumulator
- •3.3.2 Index Register
- •3.3.3 Stack Pointer
- •3.3.4 Program Counter
- •3.3.5 Condition Code Register
- •3.4 Arithmetic/Logic Unit (ALU)
- •Section 4. Interrupts
- •4.1 Contents
- •4.2 Introduction
- •4.3 Interrupt Sources
- •4.3.1 Software Interrupt
- •4.3.2 External Interrupt (IRQ)
- •4.3.3 Port B Interrupts
- •4.3.4 Capture/Compare Timer Interrupts
- •4.3.5 SCI Interrupts
- •4.3.6 SPI Interrupts
- •4.4 Interrupt Processing
- •Section 5. Resets
- •5.1 Contents
- •5.2 Introduction
- •5.3 Reset Sources
- •5.3.1 Power-On Reset (POR)
- •5.3.2 External Reset
- •5.3.3 Programmable and Non-Programmable COP Watchdog Resets
- •5.3.3.1 Programmable COP Watchdog Reset
- •5.3.3.2 Non-Programmable COP Watchdog
- •5.3.4 Clock Monitor Reset
- •Section 6. Low-Power Modes
- •6.1 Contents
- •6.2 Introduction
- •6.3 Stop Mode
- •6.3.1 SCI During Stop Mode
- •6.3.2 SPI During Stop Mode
- •6.3.3 Programmable COP Watchdog in Stop Mode
- •6.3.4 Non-Programmable COP Watchdog in Stop Mode
- •6.4 Wait Mode
- •6.4.1 Programmable COP Watchdog in Wait Mode
- •6.4.2 Non-Programmable COP Watchdog in Wait Mode
- •6.5 Data-Retention Mode
- •Section 7. Parallel Input/Output (I/O)
- •7.1 Contents
- •7.2 Introduction
- •7.3 Port A
- •7.3.1 Port A Data Register
- •7.3.2 Data Direction Register A
- •7.3.3 Port A Logic
- •7.4 Port B
- •7.4.1 Port B Data Register
- •7.4.2 Data Direction Register B
- •7.4.3 Port B Logic
- •7.5 Port C
- •7.5.1 Port C Data Register
- •7.5.2 Data Direction Register C
- •7.5.3 Port C Logic
- •7.6 Port D
- •Section 8. Capture/Compare Timer
- •8.1 Contents
- •8.2 Introduction
- •8.3 Timer Operation
- •8.3.1 Input Capture
- •8.3.2 Output Compare
- •8.4 Timer I/O Registers
- •8.4.1 Timer Control Register
- •8.4.2 Timer Status Register
- •8.4.3 Timer Registers
- •8.4.4 Alternate Timer Registers
- •8.4.5 Input Capture Registers
- •8.4.6 Output Compare Registers
- •Section 9. EPROM/OTPROM (PROM)
- •9.1 Contents
- •9.2 Introduction
- •9.3 EPROM/OTPROM (PROM) Programming
- •9.3.1 Program Register
- •9.3.2 Preprogramming Steps
- •9.4 PROM Programming Routines
- •9.4.1 Program and Verify PROM
- •9.4.2 Verify PROM Contents
- •9.4.3 Secure PROM
- •9.4.4 Secure PROM and Verify
- •9.4.5 Secure PROM and Dump
- •9.4.6 Load Program into RAM and Execute
- •9.4.7 Execute Program in RAM
- •9.4.8 Dump PROM Contents
- •9.5 Control Registers
- •9.5.1 Option Register
- •9.5.2 Mask Option Register 1
- •9.5.3 Mask Option Register 2
- •9.6 EPROM Erasing
- •Section 10. Serial Communications Interface (SCI)
- •10.1 Contents
- •10.2 Introduction
- •10.3 Features
- •10.4 SCI Data Format
- •10.5 SCI Operation
- •10.5.1 Transmitter
- •10.5.2 Receiver
- •10.6 SCI I/O Registers
- •10.6.1 SCI Data Register
- •10.6.2 SCI Control Register 1
- •10.6.3 SCI Control Register 2
- •10.6.4 SCI Status Register
- •10.6.5 Baud Rate Register
- •Section 11. Serial Peripheral Interface (SPI)
- •11.1 Contents
- •11.2 Introduction
- •11.3 Features
- •11.4 Operation
- •11.4.1 Pin Functions in Master Mode
- •11.4.2 Pin Functions in Slave Mode
- •11.5 Multiple-SPI Systems
- •11.6 Serial Clock Polarity and Phase
- •11.7 SPI Error Conditions
- •11.7.1 Mode Fault Error
- •11.7.2 Write Collision Error
- •11.7.3 Overrun Error
- •11.8 SPI Interrupts
- •11.9 SPI I/O Registers
- •11.9.1 SPI Data Register
- •11.9.2 SPI Control Register
- •11.9.3 SPI Status Register
- •Section 12. Instruction Set
- •12.1 Contents
- •12.2 Introduction
- •12.3 Addressing Modes
- •12.3.1 Inherent
- •12.3.2 Immediate
- •12.3.3 Direct
- •12.3.4 Extended
- •12.3.5 Indexed, No Offset
- •12.3.8 Relative
- •12.4 Instruction Types
- •12.4.1 Register/Memory Instructions
- •12.4.2 Read-Modify-Write Instructions
- •12.4.3 Jump/Branch Instructions
- •12.4.4 Bit Manipulation Instructions
- •12.4.5 Control Instructions
- •12.6 Opcode Map
- •Section 13. Electrical Specifications
- •13.1 Contents
- •13.2 Introduction
- •13.3 Maximum Ratings
- •13.4 Operating Temperature Range
- •13.5 Thermal Characteristics
- •13.6 Power Considerations
- •13.9 5.0-Volt Control Timing
- •13.10 3.3-Volt Control Timing
- •Section 14. Mechanical Specifications
- •14.1 Contents
- •14.2 Introduction
- •14.3 40-Pin Plastic Dual In-Line Package (PDIP)
- •14.4 40-Pin Ceramic Dual In-Line Package (Cerdip)
- •14.5 44-Lead Plastic-Leaded Chip Carrier (PLCC)
- •14.6 44-Lead Ceramic-Leaded Chip Carrier (CLCC)
- •14.7 44-Pin Quad Flat Pack (QFP)
- •14.8 42-Pin Shrink Dual In-Line Package (SDIP)
- •Section 15. Ordering Information
- •15.1 Contents
- •15.2 Introduction
- •15.3 MCU Order Numbers
- •Appendix A. MC68HSC705C8A
- •A.1 Contents
- •A.2 Introduction
- •A.3 5.0-Volt High-Speed DC Electrical Characteristics
- •A.4 3.3-Volt High-Speed DC Electrical Characteristics
- •A.5 5.0-Volt High-Speed Control Timing
- •A.6 3.3-Volt High-Speed Control Timing
- •A.8 3.3-Volt High-Speed SPI Timing
- •A.9 Ordering Information
- •Index

Instruction Set
12.4.4 Bit Manipulation Instructions
The CPU can set or clear any writable bit in the first 256 bytes of memory, which includes I/O registers and on-chip RAM locations. The
CPU can also test and branch based on the state of any bit in any of the first 256 memory locations.
Table 12-4. Bit Manipulation Instructions
Instruction |
Mnemonic |
|
|
Bit clear |
BCLR |
|
|
Branch if bit clear |
BRCLR |
|
|
Branch if bit set |
BRSET |
|
|
Bit set |
BSET |
|
|
Technical Data |
|
MC68HC705C8A — Rev. 3 |
|
|
|
162 |
Instruction Set |
MOTOROLA |
Instruction Set
Instruction Types
12.4.5 Control Instructions
These instructions act on CPU registers and control CPU operation during program execution.
Table 12-5. Control Instructions
Instruction |
Mnemonic |
||
|
|
||
Clear carry bit |
CLC |
||
|
|
||
Clear interrupt mask |
CLI |
||
|
|
||
No operation |
NOP |
||
|
|
||
Reset stack pointer |
RSP |
||
|
|
||
Return from interrupt |
RTI |
||
|
|
||
Return from subroutine |
RTS |
||
|
|
||
Set carry bit |
SEC |
||
|
|
||
Set interrupt mask |
SEI |
||
|
|
||
Stop oscillator and enable |
|
pin |
STOP |
IRQ |
|||
|
|
||
Software interrupt |
SWI |
||
|
|
||
Transfer accumulator to index register |
TAX |
||
|
|
||
Transfer index register to accumulator |
TXA |
||
|
|
||
Stop CPU clock and enable interrupts |
WAIT |
||
|
|
|
|
MC68HC705C8A — |
Rev. 3 |
Technical Data |
|
|
|
MOTOROLA |
Instruction Set |
163 |

Instruction Set
12.5 Instruction Set Summary
Table 12-6. Instruction Set Summary (Sheet 1 of 6)
Source |
Operation |
|
Form |
||
|
ADC #opr
ADC opr
ADC opr
Add with Carry
ADC opr,X
ADC opr,X
ADC ,X
ADD #opr
ADD opr
ADD opr
Add without Carry
ADD opr,X
ADD opr,X
ADD ,X
AND #opr
AND opr
AND opr
Logical AND
AND opr,X
AND opr,X
AND ,X
ASL opr ASLA
ASLX Arithmetic Shift Left (Same as LSL) ASL opr,X
ASL ,X
ASR opr
ASRA
ASRX Arithmetic Shift Right
ASR opr,X
ASR ,X
BCC rel |
Branch if Carry Bit Clear |
BCLR n opr |
Clear Bit n |
BCS rel |
Branch if Carry Bit Set (Same as BLO) |
BEQ rel |
Branch if Equal |
BHCC rel |
Branch if Half-Carry Bit Clear |
BHCS rel |
Branch if Half-Carry Bit Set |
BHI rel |
Branch if Higher |
BHS rel |
Branch if Higher or Same |
|
Effect on |
Description |
CCR |
|
|
|
H I N Z C |
A ← (A) + (M) + (C) |
— |
A ← (A) + (M) |
— |
A ← (A) (M) |
— — |
— |
C |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0 |
— — |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||||
|
|
|
b7 |
|
|
|
|
|
b0 |
|
|||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
C |
— — |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
b7 |
|
|
|
|
|
|
b0 |
|||||||
|
|
|
|
|
|
|
|
|
|
||||||||
PC ← (PC) + 2 + rel ? C = 0 |
— — — — — |
Mn ← 0 |
— — — — — |
PC ← (PC) + 2 + rel ? C = 1 |
— — — — — |
PC ← (PC) + 2 + rel ? Z = 1 |
— — — — — |
PC ← (PC) + 2 + rel ? H = 0 |
— — — — — |
PC ← (PC) + 2 + rel ? H = 1 |
— — — — — |
PC ← (PC) + 2 + rel ? C Z = 0 |
— — — — — |
PC ← (PC) + 2 + rel ? C = 0 |
— — — — — |
Address Mode |
Opcode |
Operand |
Cycles |
IMM |
A9 |
ii |
2 |
DIR |
B9 |
dd |
3 |
EXT |
C9 |
hh ll |
4 |
IX2 |
D9 |
ee ff |
5 |
IX1 |
E9 |
ff |
4 |
IX |
F9 |
|
3 |
IMM |
AB |
ii |
2 |
DIR |
BB |
dd |
3 |
EXT |
CB |
hh ll |
4 |
IX2 |
DB |
ee ff |
5 |
IX1 |
EB |
ff |
4 |
IX |
FB |
|
3 |
IMM |
A4 |
ii |
2 |
DIR |
B4 |
dd |
3 |
EXT |
C4 |
hh ll |
4 |
IX2 |
D4 |
ee ff |
5 |
IX1 |
E4 |
ff |
4 |
IX |
F4 |
|
3 |
DIR |
38 |
dd |
5 |
|
|||
INH |
48 |
|
3 |
INH |
58 |
|
3 |
IX1 |
68 |
ff |
6 |
IX |
78 |
|
5 |
DIR |
37 |
dd |
5 |
|
|||
INH |
47 |
|
3 |
INH |
57 |
|
3 |
IX1 |
67 |
ff |
6 |
IX |
77 |
|
5 |
REL |
24 |
rr |
3 |
DIR (b0) |
11 |
dd |
5 |
DIR (b1) |
13 |
dd |
5 |
DIR (b2) |
15 |
dd |
5 |
DIR (b3) |
17 |
dd |
5 |
DIR (b4) |
19 |
dd |
5 |
DIR (b5) |
1B |
dd |
5 |
DIR (b6) |
1D |
dd |
5 |
DIR (b7) |
1F |
dd |
5 |
REL |
25 |
rr |
3 |
REL |
27 |
rr |
3 |
REL |
28 |
rr |
3 |
REL |
29 |
rr |
3 |
REL |
22 |
rr |
3 |
REL |
24 |
rr |
3 |
|
|
|
|
Technical Data |
|
MC68HC705C8A — Rev. 3 |
|
|
|
164 |
Instruction Set |
MOTOROLA |

Instruction Set
Instruction Set Summary
Table 12-6. Instruction Set Summary (Sheet 2 of 6)
|
|
|
|
|
|
Effect on |
Address Mode |
Opcode |
Operand |
Cycles |
||||
Source |
Operation |
|
|
Description |
|
CCR |
|
|
|
|
|
|||
Form |
|
|
|
|
|
|
|
|
|
|
|
|||
|
|
|
|
|
H |
I |
N |
Z |
C |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||||
|
|
|
|
|
|
|
|
|
|
|
|
|
||
BIH rel |
Branch if IRQ Pin High |
|
PC ← (PC) + 2 + rel ? IRQ = 1 |
— — — |
— |
— |
|
REL |
2F |
rr |
3 |
|||
|
|
|
|
|
|
|
|
|
|
|
|
|||
BIL rel |
Branch if IRQ Pin Low |
|
PC ← (PC) + 2 + rel ? IRQ = 0 |
— — — |
— |
— |
|
REL |
2E |
rr |
3 |
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BIT #opr |
|
|
|
|
|
|
|
|
|
|
IMM |
A5 |
ii |
2 |
BIT opr |
|
|
|
|
|
|
|
|
|
|
DIR |
B5 |
dd |
3 |
BIT opr |
Bit Test Accumulator with Memory Byte |
|
|
(A) |
(M) |
— — |
|
|
— |
EXT |
C5 |
hh ll |
4 |
|
BIT opr,X |
|
|
|
|
IX2 |
D5 |
ee ff |
5 |
||||||
|
|
|
|
|
|
|
|
|
|
|||||
BIT opr,X |
|
|
|
|
|
|
|
|
|
|
IX1 |
E5 |
ff |
4 |
BIT ,X |
|
|
|
|
|
|
|
|
|
|
IX |
F5 |
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|||
BLO rel |
Branch if Lower (Same as BCS) |
|
PC ← (PC) + 2 + rel ? C = 1 |
— — — |
— |
— |
|
REL |
25 |
rr |
3 |
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
||
BLS rel |
Branch if Lower or Same |
|
PC ← |
(PC) + 2 + rel ? C Z = 1 |
— — — |
— |
— |
|
REL |
23 |
rr |
3 |
||
|
|
|
|
|
|
|
|
|
|
|
|
|||
BMC rel |
Branch if Interrupt Mask Clear |
|
PC ← (PC) + 2 + rel ? I = 0 |
— — — |
— |
— |
|
REL |
2C |
rr |
3 |
|||
|
|
|
|
|
|
|
|
|
|
|
|
|||
BMI rel |
Branch if Minus |
|
PC ← (PC) + 2 + rel ? N = 1 |
— — — |
— |
— |
|
REL |
2B |
rr |
3 |
|||
|
|
|
|
|
|
|
|
|
|
|
|
|||
BMS rel |
Branch if Interrupt Mask Set |
|
PC ← (PC) + 2 + rel ? I = 1 |
— — — |
— |
— |
|
REL |
2D |
rr |
3 |
|||
|
|
|
|
|
|
|
|
|
|
|
|
|||
BNE rel |
Branch if Not Equal |
|
PC ← (PC) + 2 + rel ? Z = 0 |
— — — |
— |
— |
|
REL |
26 |
rr |
3 |
|||
|
|
|
|
|
|
|
|
|
|
|
|
|||
BPL rel |
Branch if Plus |
|
PC ← (PC) + 2 + rel ? N = 0 |
— — — |
— |
— |
|
REL |
2A |
rr |
3 |
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
||
BRA rel |
Branch Always |
|
PC ← |
(PC) + 2 + rel ? 1 = 1 |
— — — |
— |
— |
|
REL |
20 |
rr |
3 |
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DIR (b0) |
01 |
dd rr |
5 |
|
|
|
|
|
|
|
|
|
|
|
DIR (b1) |
03 |
dd rr |
5 |
|
|
|
|
|
|
|
|
|
|
|
DIR (b2) |
05 |
dd rr |
5 |
BRCLR n opr rel |
Branch if Bit n Clear |
|
PC ← (PC) + 2 + rel ? Mn = 0 |
— — — |
— |
|
|
DIR (b3) |
07 |
dd rr |
5 |
|||
|
|
|
DIR (b4) |
09 |
dd rr |
5 |
||||||||
|
|
|
|
|
|
|
|
|
|
|
||||
|
|
|
|
|
|
|
|
|
|
|
DIR (b5) |
0B |
dd rr |
5 |
|
|
|
|
|
|
|
|
|
|
|
DIR (b6) |
0D |
dd rr |
5 |
|
|
|
|
|
|
|
|
|
|
|
DIR (b7) |
0F |
dd rr |
5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
||
BRN rel |
Branch Never |
|
PC ← |
(PC) + 2 + rel ? 1 = 0 |
— — — |
— |
— |
|
REL |
21 |
rr |
3 |
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DIR (b0) |
00 |
dd rr |
5 |
|
|
|
|
|
|
|
|
|
|
|
DIR (b1) |
02 |
dd rr |
5 |
|
|
|
|
|
|
|
|
|
|
|
DIR (b2) |
04 |
dd rr |
5 |
BRSET n opr rel |
Branch if Bit n Set |
|
PC ← (PC) + 2 + rel ? Mn = 1 |
— — — |
— |
|
|
DIR (b3) |
06 |
dd rr |
5 |
|||
|
|
|
DIR (b4) |
08 |
dd rr |
5 |
||||||||
|
|
|
|
|
|
|
|
|
|
|
||||
|
|
|
|
|
|
|
|
|
|
|
DIR (b5) |
0A |
dd rr |
5 |
|
|
|
|
|
|
|
|
|
|
|
DIR (b6) |
0C |
dd rr |
5 |
|
|
|
|
|
|
|
|
|
|
|
DIR (b7) |
0E |
dd rr |
5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DIR (b0) |
10 |
dd |
5 |
|
|
|
|
|
|
|
|
|
|
|
DIR (b1) |
12 |
dd |
5 |
|
|
|
|
|
|
|
|
|
|
|
DIR (b2) |
14 |
dd |
5 |
BSET n opr |
Set Bit n |
|
|
Mn ← |
1 |
— — — |
— |
— |
|
DIR (b3) |
16 |
dd |
5 |
|
|
|
|
DIR (b4) |
18 |
dd |
5 |
||||||||
|
|
|
|
|
|
|
|
|
|
|
||||
|
|
|
|
|
|
|
|
|
|
|
DIR (b5) |
1A |
dd |
5 |
|
|
|
|
|
|
|
|
|
|
|
DIR (b6) |
1C |
dd |
5 |
|
|
|
|
|
|
|
|
|
|
|
DIR (b7) |
1E |
dd |
5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
PC ← (PC) + 2; push (PCL) |
|
|
|
|
|
|
|
|
|
||
BSR rel |
Branch to Subroutine |
|
SP ← (SP) – 1; push (PCH) |
— — — |
— |
— |
|
REL |
AD |
rr |
6 |
|||
|
|
SP ← (SP) – 1 |
|
|||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
||
|
|
|
|
PC ← (PC) + rel |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CLC |
Clear Carry Bit |
|
|
C ← |
0 |
— — — |
— |
|
0 |
INH |
98 |
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CLI |
Clear Interrupt Mask |
|
|
I ← |
0 |
— 0 |
— — — |
|
INH |
9A |
|
2 |
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MC68HC705C8A — Rev. 3 |
|
|
|
|
|
|
|
|
|
Technical Data |
||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MOTOROLA |
|
Instruction Set |
|
|
|
|
|
|
|
|
165 |

Instruction Set
Table 12-6. Instruction Set Summary (Sheet 3 of 6)
|
|
|
|
|
|
Effect on |
Address Mode |
Opcode |
Operand |
Cycles |
|||||
Source |
Operation |
Description |
|
|
CCR |
|
|
|
|
|
|||||
Form |
|
|
|
|
|
|
|
|
|
|
|||||
|
|
|
|
|
H |
|
I |
N |
Z |
C |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CLR opr |
|
M ← |
$00 |
|
|
|
|
|
|
DIR |
3F |
dd |
5 |
||
|
|
|
|
|
|
|
|
||||||||
CLRA |
|
|
A ← |
$00 |
|
|
|
|
|
|
INH |
4F |
|
3 |
|
CLRX |
Clear Byte |
|
X ← |
$00 |
— — |
|
0 |
1 |
— |
INH |
5F |
|
3 |
||
CLR opr,X |
|
M ← |
$00 |
|
|
|
|
|
|
IX1 |
6F |
ff |
6 |
||
CLR ,X |
|
M ← |
$00 |
|
|
|
|
|
|
IX |
7F |
|
5 |
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CMP #opr |
|
|
|
|
|
|
|
|
|
|
|
IMM |
A1 |
ii |
2 |
CMP opr |
|
|
|
|
|
|
|
|
|
|
|
DIR |
B1 |
dd |
3 |
CMP opr |
Compare Accumulator with Memory Byte |
(A) – (M) |
— — |
|
|
|
|
EXT |
C1 |
hh ll |
4 |
||||
CMP opr,X |
|
|
|
|
IX2 |
D1 |
ee ff |
5 |
|||||||
|
|
|
|
|
|
|
|
|
|
|
|||||
CMP opr,X |
|
|
|
|
|
|
|
|
|
|
|
IX1 |
E1 |
ff |
4 |
CMP ,X |
|
|
|
|
|
|
|
|
|
|
|
IX |
F1 |
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dd |
|
COM opr |
|
M ← (M) = $FF – (M) |
|
|
|
|
|
|
DIR |
33 |
5 |
||||
|
|
|
|
|
|
|
|
||||||||
COMA |
|
A ← (A) = $FF – (A) |
|
|
|
|
|
1 |
INH |
43 |
|
3 |
|||
COMX |
Complement Byte (One’s Complement) |
X ← (X) = $FF – (X) |
— — |
|
|
|
INH |
53 |
|
3 |
|||||
COM opr,X |
|
M ← ( |
M |
) = $FF – (M) |
|
|
|
|
|
|
IX1 |
63 |
ff |
6 |
|
COM ,X |
|
M ← (M) = $FF – (M) |
|
|
|
|
|
|
IX |
73 |
|
5 |
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CPX #opr |
|
|
|
|
|
|
|
|
|
|
|
IMM |
A3 |
ii |
2 |
CPX opr |
|
|
|
|
|
|
|
|
|
|
|
DIR |
B3 |
dd |
3 |
CPX opr |
Compare Index Register with Memory Byte |
|
(X) – (M) |
— — |
|
|
|
|
EXT |
C3 |
hh ll |
4 |
|||
CPX opr,X |
|
|
|
|
|
IX2 |
D3 |
ee ff |
5 |
||||||
|
|
|
|
|
|
|
|
|
|
|
|||||
CPX opr,X |
|
|
|
|
|
|
|
|
|
|
|
IX1 |
E3 |
ff |
4 |
CPX ,X |
|
|
|
|
|
|
|
|
|
|
|
IX |
F3 |
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DEC opr |
|
M ← |
(M) – 1 |
|
|
|
|
|
|
DIR |
3A |
dd |
5 |
||
|
|
|
|
|
|
|
|
||||||||
DECA |
|
A ← |
(A) – 1 |
|
|
|
|
|
|
INH |
4A |
|
3 |
||
DECX |
Decrement Byte |
X ← |
(X) – 1 |
— — |
|
|
|
— |
INH |
5A |
|
3 |
|||
DEC opr,X |
|
M ← |
(M) – 1 |
|
|
|
|
|
|
IX1 |
6A |
ff |
6 |
||
DEC ,X |
|
M ← |
(M) – 1 |
|
|
|
|
|
|
IX |
7A |
|
5 |
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EOR #opr |
|
|
|
|
|
|
|
|
|
|
|
IMM |
A8 |
ii |
2 |
EOR opr |
|
|
|
|
|
|
|
|
|
|
|
DIR |
B8 |
dd |
3 |
EOR opr |
EXCLUSIVE OR Accumulator with Memory |
A ← (A) (M) |
— — |
|
|
|
— |
EXT |
C8 |
hh ll |
4 |
||||
EOR opr,X |
Byte |
|
|
|
IX2 |
D8 |
ee ff |
5 |
|||||||
|
|
|
|
|
|
|
|
|
|
||||||
EOR opr,X |
|
|
|
|
|
|
|
|
|
|
|
IX1 |
E8 |
ff |
4 |
EOR ,X |
|
|
|
|
|
|
|
|
|
|
|
IX |
F8 |
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
INC opr |
|
M ← (M) + 1 |
|
|
|
|
|
|
DIR |
3C |
dd |
5 |
|||
|
|
|
|
|
|
|
|
||||||||
INCA |
|
A ← |
(A) + 1 |
|
|
|
|
|
|
INH |
4C |
|
3 |
||
INCX |
Increment Byte |
X ← |
(X) + 1 |
— — |
|
|
|
— |
INH |
5C |
|
3 |
|||
INC opr,X |
|
M ← (M) + 1 |
|
|
|
|
|
|
IX1 |
6C |
ff |
6 |
|||
INC ,X |
|
M ← (M) + 1 |
|
|
|
|
|
|
IX |
7C |
|
5 |
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JMP opr |
|
|
|
|
|
|
|
|
|
|
|
DIR |
BC |
dd |
2 |
JMP opr |
|
|
|
|
|
|
|
|
|
|
|
EXT |
CC |
hh ll |
3 |
JMP opr,X |
Unconditional Jump |
PC ← Jump Address |
— — — |
— |
— |
|
IX2 |
DC |
ee ff |
4 |
|||||
JMP opr,X |
|
|
|
|
|
|
|
|
|
|
|
IX1 |
EC |
ff |
3 |
JMP ,X |
|
|
|
|
|
|
|
|
|
|
|
IX |
FC |
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Technical Data |
|
MC68HC705C8A — Rev. 3 |
|
|
|
166 |
Instruction Set |
MOTOROLA |

Instruction Set
Instruction Set Summary
Table 12-6. Instruction Set Summary (Sheet 4 of 6)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Effect on |
||
Source |
Operation |
|
|
|
|
|
Description |
|
CCR |
|
|||||||||||||||||||||
Form |
|
|
|
|
|
|
|
|
|||||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
H |
I N Z C |
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||
JSR opr |
|
PC |
← (PC) + n (n = 1, 2, or 3) |
|
|
|
|||||||||||||||||||||||||
JSR opr |
|
|
|
|
|||||||||||||||||||||||||||
|
Push (PCL); SP ← |
|
(SP) – 1 |
|
|
|
|||||||||||||||||||||||||
JSR opr,X |
Jump to Subroutine |
|
— — — — — |
|
|||||||||||||||||||||||||||
Push (PCH); SP ← |
|
|
(SP) – 1 |
|
|||||||||||||||||||||||||||
JSR opr,X |
|
|
|
|
|
|
|||||||||||||||||||||||||
|
PC ← Effective Address |
|
|
|
|||||||||||||||||||||||||||
JSR ,X |
|
|
|
|
|||||||||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LDA #opr |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LDA opr |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LDA opr |
Load Accumulator with Memory Byte |
|
|
|
|
|
|
|
|
|
|
A ← |
(M) |
|
|
|
|
|
|
|
|
— — |
|
— |
|||||||
LDA opr,X |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LDA opr,X |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LDA ,X |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LDX #opr |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LDX opr |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LDX opr |
Load Index Register with Memory Byte |
|
|
|
|
|
|
|
|
|
|
X ← |
(M) |
|
|
|
|
|
|
|
|
— — |
|
— |
|||||||
LDX opr,X |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LDX opr,X |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LDX ,X |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LSL opr |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LSLA |
|
C |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||
LSLX |
Logical Shift Left (Same as ASL) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
— — |
|
|
|||
|
|
|
b7 |
|
|
|
|
|
|
|
|
|
|
|
|||||||||||||||||
LSL opr,X |
|
|
|
|
|
|
|
|
|
|
|
|
|
b0 |
|
|
|
||||||||||||||
LSL ,X |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LSR opr |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LSRA |
|
0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
C |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||
LSRX |
Logical Shift Right |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
— — |
0 |
|
|||
|
|
|
b7 |
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||||||
LSR opr,X |
|
|
|
|
|
|
|
|
|
|
|
b0 |
|
|
|
||||||||||||||||
LSR ,X |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MUL |
Unsigned Multiply |
|
|
|
|
|
X : A ← |
(X) × |
(A) |
0 — — — |
0 |
||||||||||||||||||||
NEG opr |
|
|
|
M ← –(M) = $00 – (M) |
|
|
|
||||||||||||||||||||||||
NEGA |
|
|
|
A ← –(A) = $00 – (A) |
|
|
|
||||||||||||||||||||||||
NEGX |
Negate Byte (Two’s Complement) |
|
|
X ← –(X) = $00 – (X) |
— — |
|
|
||||||||||||||||||||||||
NEG opr,X |
|
|
|
M ← –(M) = $00 – (M) |
|
|
|
||||||||||||||||||||||||
NEG ,X |
|
|
|
M ← –(M) = $00 – (M) |
|
|
|
||||||||||||||||||||||||
NOP |
No Operation |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
— — — — — |
|
|
ORA #opr |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ORA opr |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ORA opr |
Logical OR Accumulator with Memory |
|
|
|
|
|
A ← (A) (M) |
— — |
|
— |
|||||||||||||||||||||
ORA opr,X |
|
|
|
|
|
|
|||||||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ORA opr,X |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ORA ,X |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ROL opr |
|
|
|
ROLA |
|
|
|
ROLX |
Rotate Byte Left through Carry Bit |
C |
— — |
ROL opr,X |
|
b7 |
b0 |
ROL ,X |
|
|
|
Address Mode |
Opcode |
Operand |
Cycles |
DIR |
BD |
dd |
5 |
EXT |
CD |
hh ll |
6 |
IX2 |
DD |
ee ff |
7 |
IX1 |
ED |
ff |
6 |
IX |
FD |
|
5 |
IMM |
A6 |
ii |
2 |
DIR |
B6 |
dd |
3 |
EXT |
C6 |
hh ll |
4 |
IX2 |
D6 |
ee ff |
5 |
IX1 |
E6 |
ff |
4 |
IX |
F6 |
|
3 |
IMM |
AE |
ii |
2 |
DIR |
BE |
dd |
3 |
EXT |
CE |
hh ll |
4 |
IX2 |
DE |
ee ff |
5 |
IX1 |
EE |
ff |
4 |
IX |
FE |
|
3 |
DIR |
38 |
dd |
5 |
|
|||
INH |
48 |
|
3 |
INH |
58 |
|
3 |
IX1 |
68 |
ff |
6 |
IX |
78 |
|
5 |
DIR |
34 |
dd |
5 |
|
|||
INH |
44 |
|
3 |
INH |
54 |
|
3 |
IX1 |
64 |
ff |
6 |
IX |
74 |
|
5 |
INH |
42 |
|
1 |
|
1 |
||
|
|
|
|
DIR |
30 |
dd |
5 |
|
|||
INH |
40 |
|
3 |
INH |
50 |
|
3 |
IX1 |
60 |
ff |
6 |
IX |
70 |
|
5 |
INH |
9D |
|
2 |
IMM |
AA |
ii |
2 |
DIR |
BA |
dd |
3 |
EXT |
CA |
hh ll |
4 |
IX2 |
DA |
ee ff |
5 |
IX1 |
EA |
ff |
4 |
IX |
FA |
|
3 |
DIR |
39 |
dd |
5 |
|
|||
INH |
49 |
|
3 |
INH |
59 |
|
3 |
IX1 |
69 |
ff |
6 |
IX |
79 |
|
5 |
|
|
|
|
MC68HC705C8A — |
Rev. 3 |
Technical Data |
|
|
|
MOTOROLA |
Instruction Set |
167 |

Instruction Set
Table 12-6. Instruction Set Summary (Sheet 5 of 6)
|
|
|
Effect on |
Source |
Operation |
Description |
CCR |
Form |
|
||
|
|
H I N Z C |
|
|
|
|
ROR opr |
|
|
|
|
RORA |
|
|
|
|
RORX |
Rotate Byte Right through Carry Bit |
|
C |
— — |
ROR opr,X |
|
b7 |
b0 |
|
ROR ,X |
|
|
|
|
RSP |
Reset Stack Pointer |
|
|
SP ← |
$00FF |
— — — — — |
|
||
|
|
SP ← (SP) + 1; Pull (CCR) |
|
|
|
|
|||
|
|
SP ← (SP) + 1; Pull (A) |
|
|
|
|
|||
RTI |
Return from Interrupt |
SP ← |
(SP) + 1; Pull (X) |
|
|
|
|
||
|
|
SP ← (SP) + 1; Pull (PCH) |
|
|
|
|
|||
|
|
SP ← (SP) + 1; Pull (PCL) |
|
|
|
|
|||
RTS |
Return from Subroutine |
SP ← (SP) + 1; Pull (PCH) |
— — — — — |
|
|||||
SP ← |
(SP) + 1; Pull (PCL) |
|
|||||||
|
|
|
|
|
|
||||
SBC #opr |
|
|
|
|
|
|
|
|
|
SBC opr |
|
|
|
|
|
|
|
|
|
SBC opr |
Subtract Memory Byte and Carry Bit from |
A |
← (A) – (M) – (C) |
— — |
|
|
|
||
SBC opr,X |
Accumulator |
|
|
|
|||||
|
|
|
|
|
|
|
|
||
SBC opr,X |
|
|
|
|
|
|
|
|
|
SBC ,X |
|
|
|
|
|
|
|
|
|
SEC |
Set Carry Bit |
|
|
C ← |
1 |
— — — — |
1 |
||
SEI |
Set Interrupt Mask |
|
|
I ← |
1 |
— |
1 |
— — — |
|
STA opr |
|
|
|
|
|
|
|
|
|
STA opr |
|
|
|
|
|
|
|
|
|
STA opr,X |
Store Accumulator in Memory |
|
|
M ← |
(A) |
— — |
|
|
— |
STA opr,X |
|
|
|
|
|
|
|
|
|
STA ,X |
|
|
|
|
|
|
|
|
|
STOP |
Stop Oscillator and Enable IRQ Pin |
|
|
|
|
— |
0 |
— — — |
|
STX opr |
|
|
|
|
|
|
|
|
|
STX opr |
|
|
|
|
|
|
|
|
|
STX opr,X |
Store Index Register In Memory |
|
|
M ← |
(X) |
— — |
|
|
— |
STX opr,X |
|
|
|
|
|
|
|
|
|
STX ,X |
|
|
|
|
|
|
|
|
|
SUB #opr |
|
|
|
|
|
|
|
|
|
SUB opr |
|
|
|
|
|
|
|
|
|
SUB opr |
Subtract Memory Byte from Accumulator |
|
A ← (A) – (M) |
— — |
|
|
|
||
SUB opr,X |
|
|
|
|
|||||
|
|
|
|
|
|
|
|
|
|
SUB opr,X |
|
|
|
|
|
|
|
|
|
SUB ,X |
|
|
|
|
|
|
|
|
|
|
|
PC ← (PC) + 1; Push (PCL) |
|
|
|
|
|||
|
|
SP ← (SP) – 1; Push (PCH) |
|
|
|
|
|||
|
|
SP ← (SP) – 1; Push (X) |
|
|
|
|
|||
SWI |
Software Interrupt |
SP ← (SP) – 1; Push (A) |
— |
1 |
— — — |
|
|||
SP ← |
(SP) – 1; Push (CCR) |
|
|||||||
|
|
|
|
|
|
||||
|
|
SP ← |
(SP) – 1; I ← 1 |
|
|
|
|
||
|
|
PCH ← Interrupt Vector High Byte |
|
|
|
|
|||
|
|
PCL ← Interrupt Vector Low Byte |
|
|
|
|
|||
TAX |
Transfer Accumulator to Index Register |
|
|
X ← |
(A) |
— — — — — |
|
Address Mode |
Opcode |
Operand |
Cycles |
DIR |
36 |
dd |
5 |
|
|||
INH |
46 |
|
3 |
INH |
56 |
|
3 |
IX1 |
66 |
ff |
6 |
IX |
76 |
|
5 |
INH |
9C |
|
2 |
INH |
80 |
|
9 |
INH |
81 |
|
6 |
IMM |
A2 |
ii |
2 |
DIR |
B2 |
dd |
3 |
EXT |
C2 |
hh ll |
4 |
IX2 |
D2 |
ee ff |
5 |
IX1 |
E2 |
ff |
4 |
IX |
F2 |
|
3 |
INH |
99 |
|
2 |
INH |
9B |
|
2 |
DIR |
B7 |
dd |
4 |
EXT |
C7 |
hh ll |
5 |
IX2 |
D7 |
ee ff |
6 |
IX1 |
E7 |
ff |
5 |
IX |
F7 |
|
4 |
INH |
8E |
|
2 |
DIR |
BF |
dd |
4 |
EXT |
CF |
hh ll |
5 |
IX2 |
DF |
ee ff |
6 |
IX1 |
EF |
ff |
5 |
IX |
FF |
|
4 |
IMM |
A0 |
ii |
2 |
DIR |
B0 |
dd |
3 |
EXT |
C0 |
hh ll |
4 |
IX2 |
D0 |
ee ff |
5 |
IX1 |
E0 |
ff |
4 |
IX |
F0 |
|
3 |
INH |
83 |
|
1 |
|
0 |
||
|
|
|
|
INH |
97 |
|
2 |
|
|
|
|
Technical Data |
|
MC68HC705C8A — Rev. 3 |
|
|
|
168 |
Instruction Set |
MOTOROLA |