- •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
317
OTIRX
Output to I/O and Increment Memory Address with Stationary I/O Address
Operation
repeat {
{UU, DE[15:0]} ← (HL) BC ← BC–1
HL ← HL+1 } while BC ≠ 0
Description
The CPU loads the contents of the memory location specified by the multibyte HL register into CPU memory. The CPU next loads the contents of this byte to the I/O address {UU, DE[15:0]}. The upper byte of I/ O addresses is undefined. The BC register decrements. The HL register increments. The Z Flag is set to 1 if the BC register decrements to 0. The instruction repeats until the BC register equals 0.
Condition Bits Affected
S Not affected.
Z Set of BC–1=0; reset otherwise.
H Not affected.
P/V Not affected.
N Set if msb of data is logical 1; reset otherwise.
C Not affected.
Attributes
Mnemonic |
Operand |
ADL Mode |
Cycle |
Op Code (hex) |
|||
OTIRX |
— |
X |
2 |
+ 3 |
* BC ED, C3 |
||
|
|
|
|
|
|
|
|
OTIRX.S |
— |
1 |
3 |
+ 3 |
* BC 52, |
ED, C3 |
|
|
|
|
|
|
|
|
|
OTIRX.L |
— |
0 |
3 |
+ 3 |
* BC 49, |
ED, C3 |
|
|
|
|
|
|
|
|
|
UM007712-0503 |
PRELIMINARY |
CPU Instruction Set |
eZ80® CPU User Manual
318
Note
This instruction is not supported on the eZ80190 device.
UM007712-0503 |
PRELIMINARY |
CPU Instruction Set |
eZ80® CPU User Manual
319
OUT (BC), r—also OUT (C), r for Z80 compatibility
Output to I/O
Operation
({UU, BC[15:0]}) ← r
Description
The r operand is any of the A, B, C, D, E, H, and L registers. The CPU outputs the contents of this byte of the specified register to the I/O address {UU, BC[15:0]}. The upper byte of the address bus, ADDR[23:16] is undefined for I/O addresses.
Condition Bits Affected
None.
Attributes
Mnemonic |
Operand |
ADL Mode |
Cycle |
Op Code (hex) |
OUT |
(BC),r |
X |
3 |
ED, 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 76.
Table 76. Register and jj Op Codes for OUT (BC), r and OUT (C), r
Instructions (hex)
Register |
jj |
|
|
A |
79 |
|
|
B |
41 |
|
|
C |
49 |
|
|
UM007712-0503 |
PRELIMINARY |
CPU Instruction Set |
eZ80® CPU User Manual
320
Table 76. Register and jj Op Codes for OUT (BC), r and OUT (C), r Instructions (hex) (Continued)
Register |
jj |
D |
51 |
|
|
E |
59 |
|
|
H |
61 |
|
|
L |
69 |
|
|
UM007712-0503 |
PRELIMINARY |
CPU Instruction Set |
eZ80® CPU User Manual
321
OUT (n), A
Output to I/O
Operation
({UU, A, n}) ←A
Description
The n operand is placed on the lower byte of the address bus, ADDR[7:0]. The CPU places the contents of the accumulator, A, onto the middle byte of the address bus, ADDR[15:8]. The upper byte of the address bus, ADDR[23:16] is undefined for I/O addresses. The CPU next outputs the contents of the accumulator to this I/O address.
Condition Bits Affected
None.
Attributes
Mnemonic |
Operand |
ADL Mode |
Cycle |
Op Code (hex) |
OUT |
(n),A |
X |
3 |
D3, nn |
|
|
|
|
|
UM007712-0503 |
PRELIMINARY |
CPU Instruction Set |
eZ80® CPU User Manual
322
OUT0 (n), r
Output to I/O
Operation
({UU, 00h, n}) ← r
Description
The r operand is any of A, B, C, D, E, H, or L. The n operand is placed on the lower byte of the address bus, ADDR[7:0], while the High byte of the address bus, ADDR[15:8], is forced to 0. The upper byte of the address bus, ADDR[23:16] is undefined for I/O addresses. The CPU next outputs the contents of the r register to the I/O address {UU, 00h, n}.
Condition Bits Affected
None.
Attributes
Mnemonic |
Operand |
ADL Mode |
Cycle |
Op Code (hex) |
OUT0 |
(n),r |
X |
4 |
ED, jj, nn |
|
|
|
|
|
jj identifies the A, B, C, D, E, H, or L register and is assembled into one of the Op Codes indicated in Table 77.
Table 77. Register and jj Op Codes for OUT0 (n), r Instruction (hex)
Register |
jj |
A |
39 |
|
|
B |
01 |
|
|
C |
09 |
|
|
UM007712-0503 |
PRELIMINARY |
CPU Instruction Set |
eZ80® CPU User Manual
323
Table 77. Register and jj Op Codes for OUT0 (n), r Instruction (hex)
Register |
jj |
D |
11 |
|
|
E |
19 |
|
|
H |
21 |
|
|
L |
29 |
|
|
UM007712-0503 |
PRELIMINARY |
CPU Instruction Set |