S3F84B8_UM_REV 1.00 2 ADDRESS SPACES2-102.3.2 USING THE REGISTER POINTS (RP)Register pointers RP0 and RP1, mapped to addresses D6H and D7H in set 1, are used to select two movable 8byte working register slices in the register file. After a reset, they point to the working register common area: RP0points to addresses C0H–C7H, and RP1 points to addresses C8H–CFH.To change a register pointer value, you load a new value to RP0 and/or RP1 using an SRP or LD instruction (seeFigure 2-7 and Figure 2-8).Using working register addressing, you can only access two 8-bit slices of the register file that are currentlypointed by RP0 and RP1. However, you cannot use the register pointers to select a working register space in set2, C0H–FFH, because these locations can be accessed by only using the Indirect Register or Indexed addressingmodes.Usually, the selected 16 byte working register block consists of two contiguous 8 byte slices. As a generalprogramming guideline, it is recommended that RP0 point to the “lower” slice and RP1 point to the “upper” slice(see Figure 2-7). In some cases, it may be necessary to define working register areas in different (non-contiguous) areas of the register file. In Figure 2-7, RP0 and RP1 point to the “upper” slice and “lower” slicerespectively.Since a register pointer can point to either of the two 8 byte slices in the working register block, you can define theworking register area to support program requirements.Example 2-1 Setting the Register PointersSRP #70H ; RP0 70H, RP1 78HSRP1 #48H ; RP0 no change, RP1 48H,SRP0 #0A0H ; RP0 A0H, RP1 no changeCLR RP0 ; RP0 00H, RP1 no changeLD RP1, #0F8H ; RP0 no change, RP1 0F8HFH (R15)0H (R0)16-ByteContiguousWorkingRegister blockRegister FileContains 328-Byte SlicesRP0RP1 8H7H0 0 0 0 1 X X X0 0 0 0 0 X X X8-Byte Slice8-Byte SliceFigure 2-7 Contiguous 16 Byte Working Register Block