
Chapter 12. Instruction Set Page 12-7
12.1.3 Dual Data Pointers
The FX2 employs dual data pointers to accelerate data memory block moves. The standard 8051
data pointer (DPTR) is a 16-bit pointer used to address external data RAM or peripherals. The FX2
maintains the standard data pointer as DPTR0 at the standard SFR locations 0x82 (DPL0) and
0x83 (DPH0); it is not necessary to modify existing code to use DPTR0.
The FX2 adds a second data pointer (DPTR1) at SFR locations 0x84 (DPL1) and 0x85 (DPH1).
The SEL bit (bit 0 of the DPTR Select Register, DPS, at SFR 0x86), selects the active pointer.
When SEL = 0, instructions that use the DPTR will use DPL0:DPH0. When SEL = 1, instructions
that use the DPTR will use DPL1:DPH1. No other bits of the DPS SFR are used.
All DPTR-related instructions use the data pointer selected by the SEL Bit. Switching between the
two data pointers by toggling the SEL bit relieves FX2 firmware from the burden of saving source
and destination addresses when doing a block move; therefore, using dual data pointers provides
significantly increased efficiency when moving large blocks of data.
The fastest way to toggle the SEL bit between the two data pointers is via the “INC DPS” instruc-
tion, which toggles bit 0 of DPS between 0 and 1.
The SFR locations related to the dual data pointers are:
0x82 DPL0 DPTR0 low byte
0x83 DPH0 DPTR0 high byte
0x84 DPL1 DPTR1 low byte
0x85 DPH1 DPTR1 high byte
0x86 DPS DPTR Select (Bit 0)
12.1.4 Special Function Registers
The four SFRs listed below are related to CPU operation and program execution. Except for the
Stack Pointer SP, each of the registers is bit addressable.
0x81 SP Stack Pointer
0xD0 PSW Program Status Word
0xE0 ACC Accumulator Register
0xF0 B B Register
Table 12-4 lists the functions of the PSW bits.
Comentarios a estos manuales