You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>eZ80</strong> <strong>CPU</strong><br />
User Manual<br />
6<br />
Mode 2<br />
This is the most powerful interrupt response mode. With this mode, you can<br />
maintain a table of 16-bit starting addresses for every interrupt service routine.<br />
This table may be located anywhere within the first 64K of memory. When an<br />
interrupt is accepted, the interrupting device places the lower eight bits of the<br />
interrupt vector on the data bus during the interrupt acknowledge cycle (Bit 0 is<br />
assumed to be zero). The actual vector address consists of Bits 23-16 as zero,<br />
Bits 15-8 are the contents of the I register, and Bits 7-0 are supplied vector byte.<br />
The 16-bit word at the above vector address is fetched and its value is the<br />
beginning of the interrupt service routine with Bits 23-16 provided by the <strong>eZ80</strong><br />
processor as zeros.<br />
In ADL mode, the interrupt table must always be in the first 64KB, as must the<br />
start of interrupt service routines entered through the interrupt table.<br />
Vectored Interrupts<br />
Vectored interrupts operate the same as Mode 2 interrupts no matter which<br />
interrupt mode is selected. In the case of the vectored interrupt response, the<br />
<strong>CPU</strong> fetches the low-order interrupt vector address not from the data bus, but<br />
from the ivedct bus. The vectored interrupt source is used exclusively for<br />
on-chip peripherals.<br />
Illegal Instruction Traps<br />
Interrupts and Traps<br />
The <strong>eZ80</strong> instruction set does not cover all possible sequences of binary<br />
values. Sequences for which no operation is defined, are illegal instructions.<br />
When an <strong>eZ80</strong> processor fetches one of these sequences, it performs a Trap<br />
sequence. The byte of the multi-byte instruction that caused the trap is indicated<br />
by the Trap register. The Trap register is not part of the <strong>eZ80</strong> <strong>CPU</strong>, so you must<br />
refer to the <strong>eZ80</strong> Product Specification for its Trap register configuration. An<br />
instruction trap resets the Program Counter (PC) to zero.<br />
Applications that only operate in Native Z80 mode or ADL mode are relatively<br />
simple with respect to interrupts and traps. In these modes, memory always<br />
starts at the beginning of the <strong>eZ80</strong>'s potential 16MB memory space and the<br />
interrupt and trap locations are never mapped. This means applications that<br />
switch between modes or operate in Virtual Z80 mode, can simplify interrupts<br />
and trap-handling by executing a STMIX instruction to set the mixed ADL bit. If<br />
the mixed ADL bit is set to 1, interrupts and instruction traps stack the ADL<br />
state, as well as the PC, and enter ADL mode in the first 64KB of the <strong>eZ80</strong>'s<br />
potential 16MB memory space.<br />
UM007701-1100