Texas Instruments TMS320C28x Reference Manual page 139

Dsp cpu and instruction set
Table of Contents

Advertisement

AMODE
"loc16/loc32" Syntax
X
*0++
Example(s):
MOVL
XAR2,#Array1
MOVL
XAR3,#Array2
MOV
@AR0,#4
MOV
@AR1,#N−1
Loop:
NOP
*,ARP2
MOVL
ACC,*0++
NOP
*,ARP3
MOVL
*++,ACC
NOP
*,ARP1
XBANZ
Loop,*−−
AMODE
"loc16/loc32" Syntax
1
*0++,ARPn
Example(s):
MOVL
XAR2,#Array1
MOVL
XAR3,#Array2
MOV
@AR0,#4
MOV
@AR1,#N−1
NOP
*,ARP2
SETC
AMODE
.lp_amode
Loop:
MOVL
ACC,*0++,ARP3
MOVL
*++,ACC,ARP1
XBANZ
Loop,*−−,ARP2
Description
32bitDataAddr(31:0) = XAR(ARP)
XAR(ARP) = XAR(ARP) + AR0
Note:
The lower 16-bits of XAR0 are added to the selected 32-bit register. Upper
16-bits of XAR0 ignored. AR0 is treated as an unsigned 16-bit value.
Overflow into the upper 16-bits of XAR(ARP) can occur.
; Load XAR2 with start address of Array1
; Load XAR3 with start address of Array2
; Set AR0 to copy every fourth value from
; Array1 to Array2
; Load AR1 with loop count N
; Set ARP pointer to point to XAR2
; Load ACC with location pointed to by XAR2,
; post−increment XAR2 by AR0
; Set ARP pointer to point to XAR3
; Store ACC into location pointed to by XAR3,
; post−increment XAR3
; Set ARP pointer to point to XAR1
; Loop until AR1 == 0, post−decrement AR1
Description
32bitDataAddr(31:0) = XAR(ARP)
XAR(ARP) = XAR(ARP) + AR0
ARP = n
Note:
The lower 16-bits of XAR0 are added to the selected 32-bit register. Upper
16-bits of XAR0 ignored. AR0 is treated as an unsigned 16-bit value.
Overflow into the upper 16-bits of XAR(ARP) can occur.
; Load XAR2 with start address of Array1
; Load XAR3 with start address of Array2
; Set AR0 to copy every fourth value from
; Array1 to Array2
; Load AR1 with loop count N
; Set ARP pointer to point to XAR2
; Make sure AMODE = 1
; Tell assembler that AMODE = 1
; Load ACC with location pointed to by XAR2,
; post−increment XAR2 by AR0, set ARP pointer
; to point to XAR3
; Store ACC into location pointed to by XAR3,
; post−increment XAR3, set ARP pointer to point
; to XAR1
; Loop until AR1 == 0, post−decrement AR1,
; set ARP to point to XAR2
Indirect Addressing Modes
C28x Addressing Modes
5-15

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?

Subscribe to Our Youtube Channel

Table of Contents

Save PDF