HP -67 Owner's Handbook Manual page 184

Hide thumbs Also See for HP-67:
Table of Contents

Advertisement

180
Branching
A
instruction used this way is known as an unconditional branch.
It always branches execution from the
instruction to the specified
label. (Later, you will see how a conditionalinstruction can be used in
conjunction with a
instruction to create a conditional branch—a
branch that depends on the outcome of a test.)
A common use of a branch is to create a ''loop'' in a program. For
example, the following program calculates and displays the square
roots of consecutive whole numbers beginning with the number1. The
HP-67 continues to compute the square root of the next consecutive
whole number until you press
to stop program execution (or
until the calculator overflows).
To key in the program:
First, slide the Program Mode switch weram [Tl run to W/PRGM.
Press [
to clear program memory and reset the calculator to
step 000.
Press
Display
omn
o
|
07
®
1
Adds 1 to current number
in R;.
1
Recalls current number
from R;.
Q
Displays current number.
o
009
31 54
o
070
35 72]
Displays square root of
current number.
7
0711
22 07]
Transfers execution to
Q
7 again.
0
012
35 22

Advertisement

Table of Contents
loading

Table of Contents