
MOTOROLA
DSP96002 USER’S MANUAL
A - 77
Example:
DO
#n1,END1
DO
#n2,END2
MOVE D0,X:(R0)+
END2
ADD
D1,D2
X:(R1)+,D3
END1
The assembler calculates the end of loop address (LA) (absolute address extension word xxxx) by evalu-
ating the end of loop expression and subtracting one. Thus the end of loop expression in the source code
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 DO 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 DO 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:
DO SP,label The actual value that will be loaded in the LC is the value of the SP before the DO instruction
incremented by one.
DO SSL,label The LC will be loaded with its previous value that was saved in the stack by the DO in-
struction itself.
CCR Condition Codes: Not affected.
ER Status Bits: Not affected.
IER Flags: Not affected.
Instruction Format: DO #count,label
i i
i i i i
i i i i
i i i i
31
14 13
0
ABSOLUTE ADDRESS
0000
0001
1011
i i i i
i i
Summary of Contents for DSP96002
Page 3: ...1 2 DSP96002 USER S MANUAL MOTOROLA ...
Page 38: ...MOTOROLA DSP96002 USER S MANUAL 3 15 Figure 3 4 Modulo Arithmetic Unit Block Diagram ...
Page 39: ...3 16 DSP96002 USER S MANUAL MOTOROLA ...
Page 53: ...4 14 DSP96002 USER S MANUAL MOTOROLA ...
Page 76: ...MOTOROLA DSP96002 USER S MANUAL 5 23 Figure 5 8 Address Modifier Summary ...
Page 86: ...6 10 DSP96002 USER S MANUAL MOTOROLA ...
Page 101: ...MOTOROLA DSP96002 USER S MANUAL 7 15 Figure 7 9 HI Block Diagram One Port ...
Page 140: ...7 54 DSP96002 USER S MANUAL MOTOROLA ...
Page 166: ...9 10 DSP96002 USER S MANUAL MOTOROLA ...
Page 181: ...MOTOROLA DSP96002 USER S MANUAL 10 15 Figure 10 8 Program Address Bus FIFO ...
Page 337: ...MOTOROLA DSP96002 USER S MANUAL A 149 ...
Page 404: ...A 216 DSP96002 USER S MANUAL MOTOROLA PC xxxx D ...
Page 460: ...A 272 DSP96002 USER S MANUAL MOTOROLA SIOP Not affected ...
Page 484: ...A 296 DSP96002 USER S MANUAL MOTOROLA SSH PC SSL SR SP 1 SP ...
Page 519: ...MOTOROLA DSP96002 USER S MANUAL A 331 ...
Page 718: ...MOTOROLA DSP96002 USER S MANUAL B 199 ...
Page 871: ... MOTOROLA INC 1994 MOTOROLA TECHNICAL DATA SEMICONDUCTOR M Addendum ...
Page 888: ...MOTOROLA INDEX 1 INDEX ...
Page 889: ......