76 Section 6: Branching and Looping
Keystrokes Display
O0
01- 44 0
3
02- 3
Loop counter. Initializes
the total number of loops
to be run.
O2
03- 44 2
Stores loop counter in
R
2
.
*
l0
04- 45 0
´©
05- 42 31
2
06- 2
´N
07- 42 12
8
08- 8
÷
09- 10
*
10- 20
”
11- 16
Original lines.
'
12- 12
l1
13- 45 1
*
14- 20
´©
15- 42 31
4
16- 4
O+0
17-44 40 0
1
18- 1
Loop increment number.
O-2
19-44 30 2
Subtracts 1 from
initialized loop counter
(line 02) in R
2
.
l2
20- 45 2
Recalls loop counter to
display.
´~
21- 42 20
Tests whether number in
X-register (loop number)
equals zero.
t00
22- 22 00
If condition is true,
branches to beginning of
program and stops.
*
These lines can be entered manually prior to running the program instead of writing
them into the program if you wish to: 1) conserve program lines; or 2) retain the
flexibility of periodically changing the number of loops to be executed.