
XPREAD loc16, *AL
6-389
XPREAD loc16, *AL
C2xLP Source-Compatible Program Read
SYNTAX OPTIONS
OPCODE
OBJMODE
RPT
CYC
XPREAD loc16,*AL
0101 0110 0011 1100
0000 0000 LLLL LLLL
1
Y
N+4
Operands
loc16
Addressing mode (see Chapter 5)
*AL
Indirect program-memory addressing using register AL,
can only access high 64K of program space range (0x3F0000 to 0x3FFFFF)
Description
Load the 16-bit data-memory location pointed to by the “loc16” addressing
mode with the 16-bit content of the program-memory location pointed to by
”*AL” addressing mode:
[loc16] = Prog[0x3F:AL];
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 XPREAD
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.
Flags and
Modes
N
If (loc16 = @AX) and bit 15 of AX is 1, then N is set; otherwise N is cleared.
Z
If (loc16 = @AX) and the value of AX is zero, then Z is set; otherwise Z is
cleared.
Repeat
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.
Example
; Copy the contents of Array1 to Array2:
; int16 Array1[N];
// Located in high 64K of program space
; int16 Array2[N]; // Located in data space
; for(i=0; i < N; i++)
; Array2[i] = Array1[i];
MOV @AL,#Array1
; AL = pointer to Array1
MOVL XAR2,#Array2
; XAR2 = pointer to Array2
RPT #(N−1)
; Repeat next instruction N times
||XPREAD *XAR2++,*AL
; Array2[i] = Array1[i],
; i++
Содержание TMS320C28x
Страница 30: ...1 12...
Страница 80: ...This page intentionally left blank 2 50 This page intentionally left blank...
Страница 269: ...IN loc16 PA 6 112 MOV AL 0 AL 0 UOUT IORegC AL IOspace IORegC AL 10...
Страница 308: ...MAXCUL P loc32 6 151 Saturate MOVL Var64 2 ACC Store result into Var64 MOVL Var64 P...
Страница 509: ...SUBL ACC P PM 6 352 SUBL ACC P PM ACC S B 11 M X 4 MOVH Y ACC 5 Store Q15 result into Y...
Страница 585: ...This page intentionally left blank 7 32 This page intentionally left blank...