EasyManuals Logo

Texas Instruments TMS320C28x User Manual

Texas Instruments TMS320C28x
695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #439 background imageLoading...
Page #439 background image
PREAD loc16,*XAR7
6-282
PREAD loc16,*XAR7 Read From Program Memory
SYNTAX OPTIONS OPCODE OBJMODE RPT CYC
PREAD loc16,*XAR7 0010 0100 LLLL LLLL X Y N+2
Operands loc16 Addressing mode (see Chapter 5)
*XAR7 Indirect programmemory addressing using auxiliary register XAR7, can
access full 4Mx16 program space range (0x000000 to 0x3FFFFF)
Description Load the data memorylocation pointed to by the “loc16” addressing mode
with the 16-bit content of the programmemory location pointed to by
”*XAR7”:
[loc16] = Prog[*XAR7];
On the C28x devices, memory blocks are mapped to both program and data
space (unified memory), hence the ”*XAR7” addressing mode can be used
to access data space variables that fall within the program space address
range.
With some addressing mode combinations, you can get conflicting
references. In such cases, the C28x will give the “loc16/loc32” field priority
on changes to XAR7. For example:
PREAD *−−XAR7,*XAR7 ; *−−XAR7 given priority
PREAD *XAR7++,*XAR7 ; *XAR7++ given priority
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 ”*XAR7”
programmemory address is copied to an internal shadow register and the
address is postincremented by 1 during each repetition.
Example
;
Copy the contents of Array1 to Array2:
; int16 Array1[N]
; // Located in program space
; int16 Array [N]
; // Located in data space
; for(i=0; i N; i++)
; Array2[i] = Array1[i];
MOVL XAR7,#Array1 ; XAR7 = pointer to Array1

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TMS320C28x and is the answer not in the manual?

Texas Instruments TMS320C28x Specifications

General IconGeneral
BrandTexas Instruments
ModelTMS320C28x
CategoryProcessor
LanguageEnglish

Related product manuals