PROGRAMMING MANUAL Standard Instruction Set
9/197
1.1.4 Indirect addressing modes
Indirect addressing modes can be considered as a combination of short and long
addressing modes. In this mode, long 16-bit addresses are specified indirectly by the
contents of a word GPR, which is specified directly by a short 4-bit address ('Rw'=0 to 15).
Some indirect addressing modes add a constant value to the GPR contents before the long
16-bit address is calculated. Other indirect addressing modes allow decrementing or
incrementing of the indirect address pointers (GPR content) by 2 or 1 (referring to words or
bytes).
In each case, one of the four DPP registers is used to specify the physical 18-bit or 24-bit
addresses. Any word or byte data within the entire memory space can be addressed
indirectly. Note that EXTP(R) and EXTS(R) instructions override the DPP mechanism.
Instructions using the lowest four word GPRs (R3...R0) as indirect address pointers are
specified by short 2-bit addresses.
Word accesses on odd byte addresses are not executed, but rather trigger a hardware trap.
After reset, the DPP registers are initialized in a way that all indirect long addresses are
directly mapped onto the identical physical addresses.
Physical addresses are generated from indirect address pointers by the following algorithm:
1 Calculate the physical address of the word GPR which is used as indirect address
pointer, by using the specified short address ('Rw') and the current register bank base
address (CP).
2 Pre-decremented indirect address pointers (‘-Rw’) are decremented by a
data-type-dependent value (
for byte operations, for word operations),
before the long 16-bit address is generated:
3 Calculate the long 16-bit address by adding a constant value (if selected) to the content
of the indirect address pointer:
Long Address = (GPR Pointer) + Constant
4 Calculate the physical 18-bit or 24-bit address using the resulting long address and the
corresponding DPP register content (see long 'mem' addressing modes).
Physical Address = (DPPi) + Page offset
5 Post-Incremented indirect address pointers (‘Rw+’) are incremented by a
data-type-dependent value (
for byte operations, for word operations):
GPRAddress CP= 2+ ShortAddressoptionalstep!;–
GPRAddressGPRAddress= optionalstep!;–
GPRPointerGPRPointer= optionalstep!;+