Keil™, An ARM® Company

C166 User's Guide

DPP Registers

DPP Registers are assigned different values depending on the mode of the MCU.

  • In the NON-SEGMENTED mode of the XC16x, C16x, and ST10, the C166 Compiler assigns the values 0-3 to DPP0-DPP3 respectively. NON-SEGMENTED mode is used for the TINY memory model.
  • In the SEGMENTED mode of the XC16x, C16x, and ST10, the C166 Compiler allocates the DPP1-DPP3 registers to allow 16-bit (near) memory areas. SEGMENTED mode is used for the SMALL, COMPACT, MEDIUM, and LARGE memory models.

The following table shows how DPP registers are used in SEGMENTED mode:

RegisterDescription
DPP0Used to access far, huge, and xhuge objects when generating code for C166-compatible devices.
DPP1Used to access the NCONST group which includes variables defined with const near.
DPP2Used to access the NDATA group which includes variables defined with near.
DPP3Used to access the SDATA or SYSTEM group which includes variables defined with sdata, idata or bdata.

You may use the DPPUSE L166 Linker directive to reassign how DPP registers are used.

Note

  • The DPP3 register is used when generating C166-compatible code to speed up copy and compare functions that access two far or huge objects.
  • The MOD167 C166 Compiler directive prevents the compiler and run-time library from changing the DPP register contents.