![background image](http://html1.mh-extra.com/html/texas-instruments/tms320c28x/tms320c28x_reference-manual_1097071137.webp)
Indirect Addressing Modes
5-13
C28x Addressing Modes
AMODE
”loc16/loc32” Syntax
Description
X
*++
32bitDataAddr(31:0) = XAR(ARP)
if(loc16), XAR(ARP) = XAR(ARP) + 1
if(loc32), XAR(ARP) = XAR(ARP) + 2
Example(s):
MOVL XAR2,#Array1 ; Load XAR2 with start address of Array1
MOVL XAR3,#Array2 ; Load XAR3 with start address of Array2
MOV @AR0,#N−1 ; Load AR0 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 *++,ACC ; Store ACC into location pointed to by XAR3,
; post−increment XAR3
NOP *,ARP0 ; Set ARP pointer to point to XAR0
XBANZ Loop,*−− ; Loop until AR0 == 0, post−decrement AR0
AMODE
”loc16/loc32” Syntax
Description
X
*++,ARPn
32bitDataAddr(31:0) = XAR(ARP)
if(loc16), XAR(ARP) = XAR(ARP) + 1
if(loc32), XAR(ARP) = XAR(ARP) + 2
Example(s):
MOVL XAR2,#Array1 ; Load XAR2 with start address of Array1
MOVL XAR3,#Array2 ; Load XAR3 with start address of Array2
MOV @AR0,#N−1 ; Load AR0 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 to point to XAR3
MOVL *++,ACC,ARP0 ; Store ACC into location pointed to by XAR3,
; post−increment XAR3, set ARP to point to XAR0
XBANZ Loop,*−−,ARP2 ; Loop until AR0 == 0, post−decrement AR0,
; set ARP pointer to point to XAR2
Summary of Contents for TMS320C28x
Page 30: ...1 12...
Page 80: ...This page intentionally left blank 2 50 This page intentionally left blank...
Page 269: ...IN loc16 PA 6 112 MOV AL 0 AL 0 UOUT IORegC AL IOspace IORegC AL 10...
Page 308: ...MAXCUL P loc32 6 151 Saturate MOVL Var64 2 ACC Store result into Var64 MOVL Var64 P...
Page 509: ...SUBL ACC P PM 6 352 SUBL ACC P PM ACC S B 11 M X 4 MOVH Y ACC 5 Store Q15 result into Y...
Page 585: ...This page intentionally left blank 7 32 This page intentionally left blank...