
- •Table of Contents
- •List of Figures
- •List of Tables
- •Manual Objectives
- •About This Manual
- •Intended Audience
- •Manual Organization
- •Related Documents
- •Manual Conventions
- •Safeguards
- •Trademarks
- •Introduction
- •Architectural Overview
- •Processor Description
- •Pipeline Description
- •Memory Modes
- •Z80 MEMORY Mode
- •ADL MEMORY Mode
- •Registers and Bit Flags
- •eZ80® CPU Working Registers
- •eZ80® CPU Control Register Definitions
- •eZ80® CPU Control Bits
- •eZ80® CPU Registers in Z80 Mode
- •eZ80® CPU Registers in ADL Mode
- •eZ80® CPU Status Indicators (Flag Register)
- •Memory Mode Switching
- •ADL Mode and Z80 Mode
- •Memory Mode Compiler Directives
- •Op Code Suffixes for Memory Mode Control
- •Single-Instruction Memory Mode Changes
- •Suffix Completion by the Assembler
- •Assembly of the Op Code Suffixes
- •Persistent Memory Mode Changes in ADL and Z80 Modes
- •Mixed-Memory Mode Applications
- •MIXED MEMORY Mode Guidelines
- •Interrupts
- •Interrupt Enable Flags (IEF1 and IEF2)
- •Interrupts in Mixed Memory Mode Applications
- •eZ80® CPU Response to a Nonmaskable Interrupt
- •eZ80® CPU Response to a Maskable Interrupt
- •Vectored Interrupts for On-Chip Peripherals
- •Illegal Instruction Traps
- •I/O Space
- •Addressing Modes
- •CPU Instruction Set
- •eZ80® CPU Instruction Notations
- •eZ80® CPU Instruction Classes
- •Instruction Summary
- •eZ80® CPU Instruction Set Description
- •CALL cc, Mmn
- •CALL Mmn
- •CPDR
- •CPIR
- •DJNZ d
- •HALT
- •INDM
- •INDMR
- •INDR
- •INDRX
- •INIM
- •INIMR
- •INIR
- •INIRX
- •LDDR
- •LDIR
- •OTDM
- •OTDMR
- •OTDR
- •OTDRX
- •OTIM
- •OTIMR
- •OTIR
- •OTIRX
- •OUTD
- •OUTD2
- •OUTI
- •OUTI2
- •PUSH AF
- •PUSH IX/Y
- •PUSH rr
- •RETI
- •RETN
- •RLCA
- •RRCA
- •RSMIX
- •STMIX
- •TSTIO n
- •Op Code Maps
- •Glossary
- •Index
- •Customer Feedback Form

eZ80® CPU User Manual
437
TSTIO n
Test I/O Byte
Operation
{0000h, C} AND n
Description
The CPU places the contents of the C register onto the lower byte of the address bus, ADDR[7:0], while it forces the two upper bytes of the address bus, ADDR[23:0], to 0s. The data at this I/O address {0000h, C}, is bitwise ANDed with the 8-bit immediate value n. The appropriate flags are set to 1, depending on the result of the AND logical operation.
Condition Bits Affected
S Set if result is negative; reset otherwise.
Z Set if result is 0; reset otherwise.
H Set.
P/V Set if parity is even; reset otherwise.
N Reset.
C Reset.
Attributes
Mnemonic |
Operand |
ADL Mode |
Cycle |
Op Code (hex) |
TSTIO |
n |
X |
4 |
ED, 74, nn |
|
|
|
|
|
UM007712-0503 |
PRELIMINARY |
CPU Instruction Set |

eZ80® CPU User Manual
438
XOR A, (HL)
Logical Exclusive OR
Operation
A ←A XOR (HL)
Description
The (HL) operand is an 8-bit value at the memory location specified by the contents of the multibyte register (HL). This 8-bit value is bitwise exclusive-ORed with the contents of the accumulator, A. The result is written to the accumulator.
Condition Bits Affected
S Set if result is negative; reset otherwise.
Z Set if result is 0; reset otherwise.
H Reset.
P/V Set if parity is even; reset otherwise.
N Reset.
C Reset.
Attributes
Mnemonic |
Operand |
ADL Mode |
Cycle |
Op Code (hex) |
XOR |
A,(HL) |
X |
2 |
AE |
|
|
|
|
|
XOR.S |
A,(HL) |
1 |
3 |
52, AE |
|
|
|
|
|
XOR.L |
A,(HL) |
0 |
3 |
49, AE |
|
|
|
|
|
UM007712-0503 |
PRELIMINARY |
CPU Instruction Set |

eZ80® CPU User Manual
439
XOR A, ir
Logical Exclusive OR
Operation
A ←A XOR ir
Description
The ir operand is any of the 8-bit registers IXH, IXL, IYH, or IYL. The ir operand is bitwise exclusive-ORed with the contents of the accumulator, A. The result is written to the accumulator.
Condition Bits Affected
S Set if result is negative; reset otherwise.
Z Set if result is 0; reset otherwise.
H Reset.
P/V Set if parity is even; reset otherwise.
N Reset.
C Reset.
Attributes
Mnemonic |
Operand |
ADL Mode |
Cycle |
Op Code (hex) |
|
XOR |
A,IXH |
X |
2 |
DD, AC |
|
|
|
|
|
|
|
XOR |
A,IXL |
X |
2 |
DD, AD |
|
|
|
|
|
|
|
XOR |
A,IYH |
X |
2 |
FD, |
AC |
|
|
|
|
|
|
XOR |
A,IYL |
X |
2 |
FD, |
AD |
|
|
|
|
|
|
UM007712-0503 |
PRELIMINARY |
CPU Instruction Set |

eZ80® CPU User Manual
440
XOR A, (IX/Y+d)
Logical Exclusive OR
Operation
A ←A XOR (IX/Y+d)
Description
The (IX/Y+d) operand is an 8-bit value at the memory location specified by the contents of the Index Register, IX or IY, added to the two’s-com- plement displacement d. This 8-bit value is bitwise exclusive-ORed with the contents of the accumulator, A. The result is written to the accumulator.
Condition Bits Affected
S Set if result is negative; reset otherwise.
Z Set if result is 0; reset otherwise.
H Reset.
P/V Set if parity is even; reset otherwise.
N Reset.
C Reset.
Attributes
Mnemonic |
Operand |
ADL Mode |
Cycle |
Op Code (hex) |
XOR |
A,(IX+d) |
X |
4 |
DD, AE, dd |
|
|
|
|
|
XOR.S |
A,(IX+d) |
1 |
5 |
52, DD, AE, dd |
|
|
|
|
|
XOR.L |
A,(IX+d) |
0 |
5 |
49, DD, AE, dd |
|
|
|
|
|
XOR |
A,(IY+d) |
X |
4 |
FD, AE, dd |
|
|
|
|
|
XOR.S |
A,(IY+d) |
1 |
5 |
52, FD, AE, dd |
|
|
|
|
|
XOR.L |
A,(IY+d) |
0 |
5 |
49, FD, AE, dd |
|
|
|
|
|
UM007712-0503 |
PRELIMINARY |
CPU Instruction Set |

eZ80® CPU User Manual
441
jj identifies the A, B, C, D, E, H, or L register and is assembled into one of the Op Codes indicated in Table 104.
Table 104. Register and jj Op Codes for XOR A, (IX/Y+d) Instruction (hex)
Register |
jj |
|
|
A |
AF |
|
|
B |
A8 |
|
|
C |
A9 |
|
|
D |
AA |
|
|
E |
AB |
|
|
H |
AC |
|
|
L |
AD |
|
|
UM007712-0503 |
PRELIMINARY |
CPU Instruction Set |

eZ80® CPU User Manual
442
XOR A, n
Logical Exclusive OR
Operation
A ←A XOR n
Description
The 8-bit immediate value n is bitwise exclusive-ORed with the contents of the accumulator, A. The result is written to the accumulator.
Condition Bits Affected
S Set if result is negative; reset otherwise.
Z Set if result is 0; reset otherwise.
H Reset.
P/V Set if parity is even; reset otherwise.
N Reset.
C Reset.
Attributes
Mnemonic |
Operand |
ADL Mode |
Cycle |
Op Code (hex) |
XOR |
A,n |
X |
2 |
EE, nn |
|
|
|
|
|
UM007712-0503 |
PRELIMINARY |
CPU Instruction Set |

eZ80® CPU User Manual
443
XOR A, r
Logical Exclusive OR
Operation
A ←A XOR r
Description
The r operand is any of the 8-bit CPU registers A, B, C, D, E, H, or L. The r operand is bitwise exclusive-ORed with the contents of the accumulator, A. The result is written to the accumulator.
Condition Bits Affected
S Set if result is negative; reset otherwise.
Z Set if result is 0; reset otherwise.
H Reset.
P/V Set if parity is even; reset otherwise.
N Reset.
C Reset
Attributes
Mnemonic |
Operand |
ADL Mode |
Cycle |
Op Code (hex) |
XOR |
A,r |
X |
1 |
jj |
|
|
|
|
|
jj identifies the A, B, C, D, E, H, or L register and is assembled into one of the Op Codes indicated in Table 105.
UM007712-0503 |
PRELIMINARY |
CPU Instruction Set |

eZ80® CPU User Manual
444
Table 105. Register and jj Op Codes for XOR A, r Instruction (hex)
Register |
jj |
|
|
A |
AF |
|
|
B |
A8 |
|
|
C |
A9 |
|
|
D |
AA |
|
|
E |
AB |
|
|
H |
AC |
|
|
L |
AD |
|
|
UM007712-0503 |
PRELIMINARY |
CPU Instruction Set |