home

DPTR

DPTR - dual pointer register - is a 16-bit register used as an indirect address (pointer) in MOVX and MOVC instructions (in MOVC the current content of accumulator is added to it to form the address, as an offset) and also in the "table jump" JMP @A+DPTR.

DPTR can be incremented in a single instruction INC DPTR.

It is formed as a concatenation of two SFRs, DPL and DPH for DPTR low and high respectively, at addresses 82h and 83h.

In modern '51 derivatives, there is often a dual (rarely more) DPTR present. The "current" DPTR is selected by a bit in an another SFR (sometimes called AUXR1). The direct access to register is either via the conventional DPL and DPH with regard of state of the selector bit; or they have two different SFR locations (as DPL0, DPH0 and DPL1, DPH1). In some derivatives, more advanced modes can be also switched on using additional SFR bits, namely DPTR autoincrement after MOVX/MOVC, dual-DPTR-autotoggle, toggled auto-increment-decrement.