English
Language : 

M166 Datasheet, PDF (120/127 Pages) Siemens Semiconductor Group – C16x Family of Siemens 16-Bit CMOS Single-Chip Microcontrollers
30Mar98@15:00h
C166 Family Instruction Set
Addressing Modes
Note: 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 via the following algorithm:
1) Calculate the physical address of the word GPR, which is used as indirect address pointer,
using the specified short address (’Rw’) and the current register bank base address (CP).
GPR Address = (CP) + 2 * Short Address
2) Pre-decremented indirect address pointers (‘-Rw’) are decremented by a data-type-
dependent value (∆=1 for byte operations, ∆=2 for word operations), before the long 16-bit
address is generated:
(GPR Address) = (GPR Address) - ∆ ; [optional step!]
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 cor-
responding 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 (∆=1 for byte operations, ∆=2 for word operations):
(GPR Pointer) = (GPR Pointer) + ∆ ; [optional step!]
The following indirect addressing modes are provided:
Mnemonic Particularities
[Rw]
Most instructions accept any GPR (R15...R0) as indirect address pointer.
Some instructions, however, only accept the lower four GPRs (R3...R0).
[Rw+]
The specified indirect address pointer is automatically post-incremented by 2 or 1
(for word or byte data operations) after the access.
[-Rw]
The specified indirect address pointer is automatically pre-decremented by 2 or 1
(for word or byte data operations) before the access.
[Rw+#data16] The specified 16-bit constant is added to the indirect address pointer, before the
long address is calculated.
Semiconductor Group
120
Version 1.2, 12.97