![background image](http://html.mh-extra.com/html/texas-instruments/msp50c614/msp50c614_user-manual_1097109176.webp)
Individual Instruction Descriptions
4-84
4.14.7 BEGLOOP
Begin Loop
Syntax
[label]
name
Clock,
clk
Word,
w
With RPT,
clk
Class
BEGLOOP
†
1
1
N/R
9d
† Loop must end with ENDLOOP.
Execution
Save next instruction address (PC + 1)
(
mask interrupts)
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
BEGLOOP
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
Description
This instruction saves the next sequential address in a shadow register and
masks interrupts. Interrupts occurring during execution of this and following
instructions are actually queued until the loop is complete (see ENDLOOP).
The loop executes N number of times. Thus, N – 2, should be loaded in R4
in order to loop N times.
BEGLOOP and ENDLOOP block has following restrictions:
-
No CALL instructions can be used.
-
All maskable interrupts are queued.
-
BEGLOOP/ENDLOOP block cannot be nested.
See Also
ENDLOOP
Example 4.14.7.1
MOV R4, count – 2 ;init R4 with loop count
BEGLOOP
ADD A0, A0~, A0
;add A0~ to A0 (count) times
ENDLOOP
Initialize R4 with the loop count value minus 2 to repeat the loop for count times. Execute the ADD A0,
A0~, A0 instruction until R4 is negative. R4 is decremented each time ENDLOOP is encountered. When
R4 is negative, ENDLOOP becomes a NOP and execution continues with the next instruction after
ENDLOOP.
Summary of Contents for MSP50C614
Page 1: ...MSP50C614 Mixed Signal Processor User s Guide SPSU014 January 2000 Printed on Recycled Paper ...
Page 6: ...vi ...
Page 92: ...3 22 ...
Page 300: ...Instruction Set Summay 4 208 Assembly Language Instructions ...
Page 314: ...Software Emulator 5 14 Figure 5 13 Project Menu Figure 5 14 Project Open Dialog ...
Page 325: ...Software Emulator 5 25 Code Development Tools Figure 5 25 EPROM Programming Dialog ...
Page 331: ...Software Emulator 5 31 Code Development Tools Figure 5 31 Context Sensitive Help System ...
Page 368: ...5 68 ...
Page 394: ...7 12 ...
Page 402: ...A 8 ...
Page 412: ...Packaging B 10 ...