Indirect Addressing Modes
5-17C28x Addressing Modes
AMODE ”loc16/loc32” Syntax Description
X *BR0++ 32bitDataAddr(31:0) = XAR(ARP)
XAR(ARP)(15:0) = AR(ARP) rcadd AR0
XAR(ARP)(31:16) = unchanged
Note: The lower 16-bits of XAR0 are reverse carry added (rcadd) to the lower
16-bits of the selected register. Upper 16-bits of XAR0 ignored. Upper
16-bits of the selected register unchanged by the operation.
Example(s):
; Transfer contents of Array1 to Array2 in bit reverse order:
MOVL XAR2,#Array1 ; Load XAR2 with start address of Array1
MOVL XAR3,#Array2 ; Load XAR3 with start address of Array2
MOV @AR0,#N ; Load AR0 with size of array,
; N must be a multiple of 2 (2,4,8,16,...)
MOV @AR1,#N−1 ; Load AR1 with loop count N
Loop:
NOP *,ARP2 ; Set ARP pointer to point to XAR2
MOVL ACC,*++ ; Load ACC with location pointed to by XAR2,
; post−increment XAR2
NOP *,ARP3 ; Set ARP pointer to point to XAR3
MOVL *BR0++,ACC ; Store ACC into location pointed to by XAR3,
; post−increment XAR3 with AR0 reverse carry add
NOP *,ARP1 ; Set ARP pointer to point to XAR1
XBANZ Loop,*−− ; Loop until AR1 == 0, post−decrement AR1
AMODE ”loc16/loc32” Syntax Description
1 *BR0++,ARPn 32bitDataAddr(31:0) = XAR(ARP)
XAR(ARP)(15:0) = AR(ARP) rcadd AR0
XAR(ARP)(31:16) = unchanged
ARP = n
Note: The lower 16-bits of XAR0 are reverse carry added (rcadd) to the lower
16-bits of the selected register. Upper 16-bits of XAR0 ignored. Upper
16-bits of the selected register unchanged by the operation.
Example(s):
; Transfer contents of Array1 to Array2 in bit reverse order:
MOVL XAR2,#Array1 ; Load XAR2 with start address of Array1
MOVL XAR3,#Array2 ; Load XAR3 with start address of Array2
MOV @AR0,#N ; Load AR0 with size of array,
; N must be a multiple of 2 (2,4,8,16,...)
MOV @AR1,#N−1 ; Load AR1 with loop count N
NOP *,ARP2 ; Set ARP pointer to point to XAR2
SETC AMODE ; Make sure AMODE = 1
.lp_amode ; Tell assembler that AMODE = 1
Loop:
MOVL ACC,*++,ARP3 ; Load ACC with location pointed to by XAR2,
; post−increment XAR2, set ARP pointer to point
; to XAR3