Indirect Addressing Modes - Texas Instruments TMS320C28x Reference Manual

Dsp cpu and instruction set
Table of Contents

Advertisement

Indirect Addressing Modes

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

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TMS320C28x and is the answer not in the manual?

Table of Contents

Save PDF