HP -15C Owner's Handbook Manual page 113

Hide thumbs Also See for HP-15C:
Table of Contents

Advertisement

Section 10: The Index Register and Loop Control
Here is a revision of the original radioisotope decay program. This
time, we will limit the program to three executions of the loop rather
than setting a specific limit value. This example uses e with a
loop control number in R
initial loop counter
Make the following changes to the program (assuming it is in memory). A
loop counter will be stored in R
Keystrokes
| ¥
t"013
−−
´e 2
t V
Now when the loop counter (stored in R
013 and go on to 014, the n instruction, thereby ending the program. If
the loop counter has not yet decreased to zero, execution continues with line
013. This branches to line 015 and continues the program and the looping.
To run the program, put t
loop counter in R
Keystrokes
| ¥
2 O 0
100 O 1
3.000001 O 2
of
2
3.0 0 0 0 1.
test (goal) value
and a line number in the Index register.
2
Display
000-
013-43,30, 9
011-
012-42, 5, 2
013-
(day 1) in R
1
, and the line number for branching in the Index register.
2
Display
2.00000
100.0000
3.0000
Program mode.
The second of the two loop
test condition lines.
42 31
Delete lines 013 and 012.
Add
function (counter stored in
R
).
2
22 25
Go to given line number
(015).
) has reached zero, it will skip line
2
, N
(initial isotope batch) in R
0
0
Run mode.
t
N
Loop counter. (This
instruction could also be
programmed.)
decrement value
your
loop
.
1
.
0
113
counter
the
1

Advertisement

Table of Contents
loading

Table of Contents