Texas Instruments TMS320C28x Reference Manual page 547

Dsp cpu and instruction set
Table of Contents

Advertisement

XPWRITE *A,loc16
XPWRITE *A,loc16
SYNTAX OPTIONS
XPWRITE *AL,loc16
Operands
*AL
loc16
Description
Flags and
Modes
Repeat
Example
; Copy the contents of Array1 to Array2:
; int16 Array1[N];
; int16 Array2[N];
; for(i=0; i < N; i++)
;
Array2[i] = Array1[i];
MOVL
MOV
RPT
||XPWRITE *AL,*XAR2++
6-390
0101 0110 0011 1101
0000 0000 LLLL LLLL
Indirect program-memory addressing using register AL, can only access
high 64K of program space range (0x3F0000 to 0x3FFFFF)
Addressing mode (see Chapter 5)
Load the 16-bit program-memory location pointed to by "*AL" addressing
mode with the 16-bit content of the location pointed to by the "loc16"
addressing mode:
Prog[0x3F:AL] = [loc16];
The C28x forces the upper 6 bits of the program memory address, specified
by the "*AL" addressing mode, to 0x3F when using this form of the XPWRITE
instruction. This limits the program memory address to the high 64K of
program address space (0x3F0000 to 0x3FFFFF). On the C28x devices,
memory blocks are mapped to both program and data space (unified
memory), hence the "*AL" addressing mode can be used to access data
space variables that fall within its address range.
None
This instruction is repeatable. If the operation follows a RPT instruction, then
it will be executed N+1 times. When repeated, the "*AL" program-memory
address is copied to an internal shadow register and the address is
post-incremented by 1 during each repetition.
// Located in data space
// Located in high 64K of program space
XAR2,#Array1
; XAR2 = pointer to Array1
@AL,#Array2
; AL
#(N−1)
; Repeat next instruction N times
; Array2[i] = Array1[i],
; i++
C2xLP Source-Compatible Program Write
OPCODE
OBJMODE
= pointer to Array2
RPT
CYC
1
Y
N+4

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