Indirect Addressing Modes
5-10
5.6 Indirect Addressing Modes
This section includes indirect addressing modes for the 28x and 2xLP devices.
It also includes circular indirect addressing modes.
5.6.1 C28x Indirect Addressing Modes (XAR0 to XAR7)
AMODE
”loc16/loc32” Syntax
Description
X
*XARn++
ARP = n
32bitDataAddr(31:0) = XARn
if(loc16), XARn = XARn + 1
if(loc32), XARn = XARn + 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:
MOVL ACC,*XAR2++ ; Load ACC with location pointed to by XAR2,
; post−increment XAR2
MOVL *XAR3++,ACC ; Store ACC into location pointed to by XAR3,
; post−increment XAR3
BANZ Loop,AR0−− ; Loop until AR0 == 0, post−decrement AR0
AMODE
”loc16/loc32” Syntax
Description
X
*−−XARn
ARP = n
if(loc16), XARn = XARn
−
1
if(loc32), XARn = XARn
−
2
32bitDataAddr(31:0) = XARn
Example(s):
MOVL XAR2,#N*2 ; Load XAR2 with end address of Array1
MOVL XAR3,#N*2 ; Load XAR3 with end address of Array2
MOV @AR0,#N−1 ; Load AR0 with loop count N
Loop:
MOVL ACC,*−−XAR2 ; Pre−decrement XAR2,
; load ACC with location pointed to by XAR2
MOVL *−−XAR3,ACC ; Pre−decrement XAR3,
; store ACC into location pointed to by XAR3,
BANZ Loop,AR0−− ; Loop until AR0 == 0, post−decrement AR0
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...