Motorola DSP96002 User Manual page 268

32-bit digital signal processor
Table of Contents

Advertisement

represents the "next address" after the end of the loop. If a simple end of loop address label is used, it
should be placed after the last instruction in the loop.
The LA register is compared to the PC to determine when the end of loop is reached. If the end of loop is
reached, the loop counter (LC) is tested for one. If LC is not equal to one then it is decremented by one.
If LC is equal to one, the system stack is purged and instruction fetches continue at the incremented PC
address. Otherwise, the PC value on the top of the stack is read to fetch the start of the loop again.
Since the end of loop comparison is at fetch time and ahead of the end of loop execution, instructions which
change program flow or change the system stack may not be used near the end of the loop without some
restrictions. Proper hardware loop operation is guaranteed if no instruction starting at address LA-2, LA-
1 or LA specifies the program controller registers SR, SP, SSL, LA, LC or (implicitly) PC as a destination
register; or specifies SSH as a source or destination register. Also, SSH cannot be specified as a source
register in the DOR instruction itself. The assembler will generate a warning if the restricted instructions
are found within their restricted boundaries. See Section A.10 for the complete list of restrictions.
Implementation Notes:
DOR SP,label
The actual value that will be loaded in the LC is the value of the SP before the DOR
DOR SSL,label The LC will be loaded with its previous value that was saved in the stack by the DOR
CCR Condition Codes: Not affected.
ER Status Bits: Not affected.
IER Flags: Not affected.
Instruction Fields:
<ea> Rn - R0-R7 (All address register indirect addressing modes except (Rn+xxx) )
Instruction Format:
31
0000
0001
Instruction Format:
31
0000
0001
Instruction Format:
31
0000
0001
A - 80
instruction incremented by one.
instruction itself.
DOR
#count,label
1011
i i i i
PC RELATIVE REPLACEMENT
DOR
S,label
1010
0000
PC RELATIVE REPLACEMENT
DOR
X: ea, label
DOR
Y: ea, label
100S
MMMR
PC RELATIVE REPLACEMENT
DSP96002 USER'S MANUAL
14 13
i i
i i
i i i i
14 13
00
00
0000
14 13
00
0000
0
0 i i i
i i i i
0
0ddd
dddd
0
0000
0000
MOTOROLA

Advertisement

Table of Contents
loading

Table of Contents