Texas Instruments TMS320C28x Reference Manual page 141

Dsp cpu and instruction set
Table of Contents

Advertisement

AMODE
"loc16/loc32" Syntax
X
*BR0++
Example(s):
; Transfer contents of Array1 to Array2 in bit reverse order:
MOVL
XAR2,#Array1
MOVL
XAR3,#Array2
MOV
@AR0,#N
MOV
@AR1,#N−1
Loop:
NOP
*,ARP2
MOVL
ACC,*++
NOP
*,ARP3
MOVL
*BR0++,ACC
NOP
*,ARP1
XBANZ
Loop,*−−
AMODE
"loc16/loc32" Syntax
1
*BR0++,ARPn
Example(s):
; Transfer contents of Array1 to Array2 in bit reverse order:
MOVL
XAR2,#Array1
MOVL
XAR3,#Array2
MOV
@AR0,#N
MOV
@AR1,#N−1
NOP
*,ARP2
SETC
AMODE
.lp_amode
Loop:
MOVL
ACC,*++,ARP3
Description
32bitDataAddr(31:0) = XAR(ARP)
XAR(ARP)(15:0) = AR(ARP) rcadd AR0
XAR(ARP)(31:16) = unchanged
Note:
The lower 16-bits of XAR0 are reverse carry added (rcadd) to the lower
16-bits of the selected register. Upper 16-bits of XAR0 ignored. Upper
16-bits of the selected register unchanged by the operation.
; Load XAR2 with start address of Array1
; Load XAR3 with start address of Array2
; Load AR0 with size of array,
; N must be a multiple of 2 (2,4,8,16,...)
; Load AR1 with loop count N
; Set ARP pointer to point to XAR2
; Load ACC with location pointed to by XAR2,
; post−increment XAR2
; Set ARP pointer to point to XAR3
; Store ACC into location pointed to by XAR3,
; post−increment XAR3 with AR0 reverse carry add
; Set ARP pointer to point to XAR1
; Loop until AR1 == 0, post−decrement AR1
Description
32bitDataAddr(31:0) = XAR(ARP)
XAR(ARP)(15:0) = AR(ARP) rcadd AR0
XAR(ARP)(31:16) = unchanged
ARP = n
Note:
The lower 16-bits of XAR0 are reverse carry added (rcadd) to the lower
16-bits of the selected register. Upper 16-bits of XAR0 ignored. Upper
16-bits of the selected register unchanged by the operation.
; Load XAR2 with start address of Array1
; Load XAR3 with start address of Array2
; Load AR0 with size of array,
; N must be a multiple of 2 (2,4,8,16,...)
; 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, set ARP pointer to point
; to XAR3
Indirect Addressing Modes
C28x Addressing Modes
5-17

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