RPT #8bit/loc16
6-312
RPT #8bit/loc16
Repeat Next Instruction
SYNTAX OPTIONS
OPCODE
OBJMODE
RPT
CYC
RPT #8bit
1111 0110 CCCC CCCC
X
−
1
RPT loc16
1111 0111 LLLL LLLL
X
−
4
Operands
#8bit
8-bit constant immediate value (0 to 255 range)
loc16
Addressing mode (see Chapter 5)
Description
Repeat the next instruction. An internal repeat counter (RPTC) is loaded with a value
N that is either the specified #8bit constant value or the content of the location po
i
nted
to by the “loc16” addressing mode. After the instruction that follows the RPT is exe-
cuted once, it is repeated N times; that is, the instruction following the RPT executes
N + 1 times. Because the RPTC cannot be saved during a context switch, repeat lo
o
ps
are regarded as multicycle instructions and are not interruptible.
Note on syntax:
Parallel bars (||) before the repeated instruction are used as a reminder that
the instruction is repeated and is not interruptable.
When writing inline assembly, use the syntax
asm(|| RPT #8bt/ loc16 || instruction”);
Not all instructions are repeatable. If an instruction that is not repeatable follows the
RPT instruction, the RPTC counter is reset to 0 and the instruction only executes
once. The 28x Assembly Language tools check for this condition and issue warnings.
Flags and
Modes
None
Repeat
This instruction is not repeatable. If this instruction follows the RPT instruction, it re-
sets the repeat counter (RPTC) and executes only once.
Example
;
Copy the number of elements specified in VarA from Array1
;
to Array2:
;
int16 Array1[N]; // Located in high 64K of program space
;
int16 Array2[N]; // Located in data space
;
for(i=0; i < VarA; i++)
;
Array2[i] = Array1[i];
MOVL XAR2,#Array2
; XAR2 = pointer to Array2
RPT @VarA
; Repeat next instruction
; [VarA] + 1 times
|| XPREAD *XAR2++,*(Array1)
; 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...