Section 3 DSP Operation
CASE 4: 4 or More Repeated Instructions
LDRS
LDRE
SETRC
- - - -
RptStart0: instr0;
RptStart:
instr1;
instr2;
instr3;
----------------------------------------------------------
RptEnd3:
instrN-3;
instrN-2;
instrN-1;
RptEnd:
instrN;
instrN+1;
The examples above can be used as a template to program this repeat loop sequences. However,
for easy programming, an extended instruction REPEAT is provided to handle these complex
labeling and offset issues. Details will be described in the following note 2.
Note 2: Extended Instruction REPEAT
This REPEAT extended instruction will handle all the delicate labeling and offset processing
described in table 3.17 and note 1. The labels used here are:
Rptart:
An address of the instruction at the top of the repeat loop
RptEnd:
An address of the instruction at the bottom of the repeat loop
RptCount: Repeat count immediate number
This instruction can be used in the following way:
Here the repeat count can be specified as an immediate value #Imm or a register indirect value Rn.
Rev. 4.00 Sep. 14, 2005 Page 130 of 982
REJ09B0023-0400
RptStart;
RptEnd3+4;
RptCount;
Repeated instruction 1
Repeated instruction 2
Repeated instruction 3
Repeated instruction N-3
Repeated instruction N-2
Repeated instruction N-1
Repeated instruction N