EasyManuals Logo

Texas Instruments TMS320C28x User Manual

Texas Instruments TMS320C28x
695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #134 background imageLoading...
Page #134 background image
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,#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 ; 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

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

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

Texas Instruments TMS320C28x Specifications

General IconGeneral
BrandTexas Instruments
ModelTMS320C28x
CategoryProcessor
LanguageEnglish

Related product manuals