Texas Instruments TMS320C28x Reference Manual page 135

Dsp cpu and instruction set
Table of Contents

Advertisement

AMODE
"loc16/loc32" Syntax
X
*+XARn[AR0]
Example(s):
MOVW
DP,#Array1Ptr
MOVL
XAR2,@Array1Ptr
MOVB
XAR0,#16
MOVB
XAR1,#68
MOVL
ACC,*+XAR2[AR0]
MOVL
P,*+XAR2[AR1]
MOVL
*+XAR2[AR1],ACC
MOVL
*+XAR2[AR0],P
AMODE
"loc16/loc32" Syntax
X
*+XARn[AR1]
Example(s):
MOVW
DP,#Array1Ptr
MOVL
XAR2,@Array1Ptr ; Load XAR2 with pointer to Array1
MOVB
XAR0,#16
MOVB
XAR1,#68
MOVL
ACC,*+XAR2[AR0] ;; Swap contents of location Array1[16]
MOVL
P,*+XAR2[AR1]
MOVL
*+XAR2[AR1],ACC ;;
MOVL
*+XAR2[AR0],P
AMODE
"loc16/loc32" Syntax
X
*+XARn[3bit]
Example(s):
MOVW
DP,#Array1Ptr
MOVL
XAR2,@Array1Ptr ; Load XAR2 with pointer to Array1
MOVL
ACC,*+XAR2[2]
MOVL
P,*+XAR2[5]
MOVL
*+XAR2[5],ACC
MOVL
*+XAR2[2],P
Note:
The assembler also accepts "*XARn" as an addressing mode. This is the same encoding as the "*+XARn[0]" mode.
Description
ARP = n
32bitDataAddr(31:0) = XARn + AR0
Note:
The lower 16-bits of XAR0 are added to the selected 32-bit register. Upper
16-bits of XAR0 are ignored. AR0 is treated as an unsigned 16-bit value.
Overflow into the upper 16-bits of XARn can occur.
; Point to Array1 Pointer location
; Load XAR2 with pointer to Array1
; AR0 = 16, AR0H = 0
; AR1 = 68, AR1H = 0
;; Swap contents of location Array1[16]
;; with the contents of location Array1[68]
;;
;;
Description
ARP = n
32bitDataAddr(31:0) = XARn + AR1
Note:
The lower 16-bits of XAR0 are added to the selected 32-bit register. Upper
16-bits of XAR0 are ignored. AR0 is treated as an unsigned 16-bit value.
Overflow into the upper 16-bits of XARn can occur.
; Point to Array1 Pointer location
; AR0 = 16, AR0H = 0
; AR1 = 68, AR1H = 0
;; with the contents of location Array1[68]
;;
Description
ARP = n
32bitDataAddr(31:0) = XARn + 3bit
Note:
The immediate value is treated as an unsigned 3-bit value.
; Point to Array1 Pointer location
;; Swap contents of location Array1[2]
;; with the contents of location Array1[5]
;;
;;
Indirect Addressing Modes
C28x Addressing Modes
5-11

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