Individual Instruction Descriptions
4-97
Assembly Language Instructions
4.14.15
ENDLOOP
End Loop
Syntax
[label]
name
#
Clock, clk
Word, w
With RPT, clk
Class
ENDLOOP
[n]
1
1
N/R
9d
Execution
If (R4
≥
0)
decrement R4 by n (1 or 2)
PC
⇐
first address after BEGLOOP
else
NOP
PC
⇐
PC + 1
Flags Affected
None
Opcode
Instructions
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
ENDLOOP n
1
1
1
1
1
1
1
1
0
0
0
0
1
0
0
0
n
Description
This instruction marks the end of a loop defined by BEGLOOP. If register R4
is not negative, R4 is decremented by n and the loop is executed again
beginning with the first instruction after the BEGLOOP. If R4 is negative, a
NOP instruction is executed and program exits the loop. Interrupts (queued by
BEGLOOP) are processed according to their priority. This instruction results
in an overhead of one instruction cycle per loop cycle compared to two
instruction cycle if branching is used. If ENDLOOP is used without any
argument, it assumes n =1.
See Also
BEGLOOP, INTE
Example 4.14.15.1
See Example 4.14.7.1 in BEGLOOP.
Содержание MSP50C6xx
Страница 1: ...MSP50C6xx Mixed Signal Processor User s Guide Mixed Signal Products SPSU014A Printed on Recycled Paper...
Страница 6: ...vi...
Страница 14: ...xiv...
Страница 24: ...1 10...
Страница 296: ...Instruction Set Summay 4 210 Assembly Language Instructions...
Страница 332: ...Implementation Details 5 36 R7 Return Addr Return Addr Param 2 Param 2 Param 1 Param 1 R5 Stack data Function call...
Страница 366: ...6 12...