Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>eZ80</strong> <strong>CPU</strong><br />
User Manual<br />
4<br />
Interrupts<br />
Virtual Z80 Mode<br />
ADL Mode<br />
If ADL is cleared to zero, but MBASE contains a non-zero value, the<br />
programming model still includes 16-bit registers and a 64KB memory space,<br />
but this space is relocated in the 16MB memory space by MBASE. The upper<br />
eight bits of address (23-16) are the value of the MBASE register. In this Virtual<br />
Z80 mode, several tasks can have their own Z80 partition. The MBASE register<br />
can only be changed while in ADL mode.<br />
If ADL is set to 1, MBASE has no effect on memory addressing. In this mode,<br />
the PC, BC, DE, HL, IX and IY registers are expanded from 16 to 24 bits and a<br />
24-bit Stack Pointer Long (SPL) register replaces the 16-bit Stack Pointer Short<br />
(SPS) register that is used in the other modes. When the processor fetches an<br />
instruction that includes a 16-bit address or immediate data in the other modes,<br />
it automatically fetches a 24-bit address or data.<br />
Mode Switching<br />
The <strong>eZ80</strong> only switches between ADL mode and the other modes as part of a<br />
specially-prefixed CALL, JP, RET, or RST instruction, or an interrupt or trap<br />
operation. The MBASE register can only be changed while in ADL mode.<br />
Interrupts allow peripheral devices to suspend <strong>CPU</strong> operation in an orderly<br />
manner and force the <strong>CPU</strong> to start a peripheral service routine. Once the<br />
service routine is completed, the <strong>CPU</strong> returns to the operation in which it was<br />
interrupted.<br />
Interrupt Enable/Disable<br />
The <strong>eZ80</strong> has three interrupt inputs, two software maskable interrupts and a<br />
non-maskable interrupt. The non-maskable interrupt (NMI) cannot be disabled<br />
by the programmer, but is accepted when the peripheral device requests it. You<br />
can enable or disable the maskable interrupts (INT and INTV).<br />
In the <strong>eZ80</strong> <strong>CPU</strong>, there are two interrupt enable flags (called IEF1 and IEF2)<br />
that you can set or reset using the Enable Interrupt (EI) and Disable Interrupt<br />
(DI) instructions. When IEF1 is reset, a maskable interrupt cannot be accepted<br />
by the <strong>CPU</strong>.<br />
UM007701-1100