Infineon Technologies C166S V2 User Manual page 54

16-bit microcontroller
Table of Contents

Advertisement

Some instructions only use the lowest four word GPRs (R3...R0) as indirect address
pointers, which are specified via short 2-bit addresses in that case.
Physical addresses are generated from indirect address pointers using 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 global register bank
GPR Address = (CP) + 2
- the current local register bank
GPR Address = 2
2)
If required, pre-decremented indirect address pointer ('-Rw') by the data-type-
dependent value (D=1 for byte operations, D=2 for word operations) before
the long 16-bit address is generated:
(GPR Address) = (GPR Address) - D ; [optional step!]
3)
Calculate the long 16-bit address by adding a constant value ('Rw+const16' if
selected) to the contents of the indirect address pointer:
Long Address = (GPR Pointer) + Constant ; [+Constant is optional]
4)
Calculate the physical 24-bit address using the resulting long address and the
corresponding DPP register contents (see long 'mem' addressing modes).
Physical Address = (DPPi) + Page offset
5)
- If required, post-in/decrement indirect address pointers ('Rw±') by the data-
type-dependent value (D=1 for byte operations, D=2 for word operations).
- If required, post-in/decrement indirect address pointers ('Rw± QRx') by
D=QRx:
(GPR Pointer) = (GPR Pointer) ± D ; [optional step!]
User Manual
Short Address
*
Short Address.
*
2-54
User Manual
C166S V2
Central Processing Unit
V 1.7, 2001-01

Advertisement

Table of Contents
loading

Table of Contents