EasyManua.ls Logo

HP HP-11C

HP HP-11C
264 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
212
Section
11:
Programming
Techniques
the
integer
portion
is
always
greater
than
zero,
the
step
immediately
following
[ISG]
is
always
skipped.
For
this
reason
a
dummy
step,
in
this case,
occupies
that
spot.
Stepping
through
the
program
will
illustrate
the
subroutine’s
function.
Instructions
First
Execution
Second
Execution
4
(sTo](1)
0
[Fe[Jo
[Re()2
(GSB]9
|
>
(rou)s
[Fel(3
(GS8]9
>
[Rel)9
I=56
I=6
Skipped.
Skipped.
(ReL]((i))
Recalls
Rs.
Recalls
Rg.
R,
XRg
R3XRg
RoXR,XRg
Rg
X
R
3
XRg
0+RyXR,XRg
Adds
to
previous
total.
(s10]O
Stores
total
in
Ry,
Stores
new
total
in
Ry,
(g][R
The
space
savings
is
clear.
Four
steps
would
have
been
repeated
six
times,
a
total
of
twenty-four
steps.
The
subroutine
condensed
this
to
ten
(including
4
(1)
and
excluding
0
which
would
have
been
performed
anyway).
Data
Input
In
writing
a
program,
once
you
have
decided
on
what
data
your
program
needs,
you
must
then
decide
on
how
it
will
be
stored.
Indeed,
there
are
several
options
depending
on
the
space
you
have
and
the
number
of
inputs
to
be
stored.

Table of Contents

Related product manuals