Indirect Addressing Modes
5-12
5.6.2 C2xLP Indirect Addressing Modes (ARP, XAR0 to XAR7)
AMODE ”loc16/loc32” Syntax Description
X * 32bitDataAddr(31:0) = XAR(ARP)
Note: The XARn register used is the register pointed to by the current value in
the ARP pointer. ARP = 0, points to XAR0, ARP = 1, points to XAR1 and
so on.
Example(s):
MOVZ DP,#RegAPtr ; Load DP with page address containing RegAPtr
MOVZ AR2,@RegAPtr ; Load AR2 with contents of RegAPtr, AR2H = 0
MOVZ AR3,@RegBPtr ; Load AR3 with contents of RegBPtr, AR3H = 0
; RegAPtr and RegBPtr are located in the same
; 128 word data page. Both are located in
; the low 64K of data memory space.
NOP *,ARP2 ; Set ARP pointer to point to XAR2
MOV *,#0x0404 ; Store 0x0404 into location pointed by XAR2
NOP *,ARP3 ; Set ARP pointer to point to XAR3
MOV *,#0x8000 ; Store 0x8000 into location pointed by XAR3
AMODE ”loc16/loc32” Syntax Description
X *,ARPn 32bitDataAddr(31:0) = XAR(ARP)
ARP = n
Example(s):
MOVZ DP,#RegAPtr ; Load DP with page address containing RegAPtr
MOVZ AR2,@RegAPtr ; Load AR2 with contents of RegAPtr, AR2H = 0
MOVZ AR3,@RegBPtr ; Load AR3 with contents of RegBPtr, AR3H = 0
; RegAPtr and RegBPtr are located in the same
; 128 word data page. Both are located in
; the low 64K of data memory space.
NOP *,ARP2 ; Set ARP pointer to point to XAR2
MOV *,#0x0404,ARP3 ; Store 0x0404 into location pointed by XAR2,
; Set ARP pointer to point to XAR3
MOV *,#0x8000 ; Store 0x8000 into location pointed by XAR3