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 />
8<br />
ADL and Mixed ADL<br />
• Relative Address—Relative addressing uses one byte of data following the<br />
Op Code to specify a displacement from the existing program to which a<br />
program jump can occur. The displacement is a signed two’s complement<br />
number that is added to the address of the Op Code following the<br />
instruction. The signed displacement can range from +127 to -128. This<br />
specifies a range of addresses -126 to +129 from the start of the instruction<br />
to which program control can be transferred.<br />
• Direct Address—Direct-addressing instructions include a 16-bit logical or<br />
24-bit linear address, depending on a prefix byte or the ADL mode. This can<br />
be an address to which the program can jump to or the address where the<br />
operand is located.<br />
• Indexed Addressing—In this mode of addressing, a byte of data following<br />
the Op Code contains a displacement to be added to one of the IX or IY<br />
index registers. The displacement is in two’s complement form in the range<br />
of +127 to -128. Depending on a prefix byte or the ADL mode, the index<br />
register supplies a 24-bit linear address or a 16-bit logical address that is<br />
subject to MBASE.<br />
• Register Indirect Addressing—The address is taken from one of the multibyte<br />
BC, DE or HL registers. Depending on a prefix byte or the ADL mode,<br />
the register supplies a 24-bit linear address or a 16-bit logical address that is<br />
subject to MBASE.<br />
• Register Addressing—Many of the <strong>eZ80</strong> instructions contain information<br />
that specifies the <strong>CPU</strong> register that is to be used for an operation.<br />
Interrupts, Traps, and RST Instructions<br />
All of these operations are affected by a global state called Mixed ADL, which<br />
should be set appropriately for each application. Mixed ADL should be 0 for<br />
applications in which all code runs in the same ADL state, but should be set to 1<br />
for applications that include some code that runs in ADL mode and some that<br />
runs in other modes. If Mixed ADL is set to 1, and an interrupt, trap, or restart<br />
occurs, the <strong>eZ80</strong> stacks a byte containing the ADL mode of the interrupted,<br />
trapped, or called process on SPL before setting ADL mode for the service<br />
routine.<br />
UM007701-1100