Problems - HP -67 Owner's Handbook Manual

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

Advertisement

182
Branching
Looping techniques like the one illustrated here are common and
extraordinarily useful in programming. By using loops, you take
advantage of one of the most powerful features of the HP-67—the
ability to update data and perform calculations automatically, quickly,
and, if you so desire, endlessly.
You can use unconditional branches to create a loop, as shown above,
or in any part of a program where you wish to transfer execution to
another label. When the calculator executes a
instruction, it
searches sequentially downward through program memory and begins
execution again at the first specified labelit encounters.
Problems
1.
The following program calculates and pauses to display the
square of the number 1 each time it is run. Key the program in
with the W/PRGM-RUN switch werem [[[Illrun set to
W/PRGM, then switch to RUN and run the program a few times
to see how it works. Finally, modify the program by inserting an
o
{2 instruction after the
1 instruction in step 003,
and a
2 instruction after the second (3
instruction.
This should create a loop that will continually display a new
number and display its square, then increment the number by 1,
display the new number and compute and display its square, etc.
To load the original program, before modification, slide the
W/PRGM-RUN switch werem [[[[IllruN to W/PRGM. Then:
Press
Display
o
0DEDQ
0
1
1
1
1
006
34 01
007
008
32 54
009
35 72
0 kN
Run the program to generate a table of squares.

Advertisement

Table of Contents
loading

Table of Contents