Section 10: Subroutines - HP -67 Owner's Handbook Manual

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

Advertisement

Section 10
Subroutines
Often, a program contains a certain series of instructions that are
executed several times throughout the program. When the same set of
instructions occurs more than once in a program, it can be executed as
a subroutine. A subroutine is selected by the
(go to subroutine)
operation, followed by a label address (£ through [&, (0] through
(8)); or by
followed by () through (£]. You can also select a
subroutine with
[]—more about [f] later.
A
or
instruction transfers execution to the routine specified
by the label address, just like a
instruction. However, after a
or
instruction has been executed, when the running pro-
gram then executes a
(return), execution is transferred back to
the next instruction after the (G55). Execution then continues sequen-
tially downward through program memory. The illustration below
should make the distinction between
and
more clear.
Branch
@o
@o
GO 6
RTN
Execution stops here.
Subroutine
@
2@

Advertisement

Table of Contents
loading

Table of Contents