EasyManuals Logo
Home>HP>Calculator>HP-11C

HP HP-11C User Manual

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
Page #213 background imageLoading...
Page #213 background image
Section
11:
Programming
Techniques
211
rewrite
the
subroutine’s
steps
eight
times.
What
you
also
notice
is
an
increase
in
organization
from
using
a
subroutine.
The
program
has
been
broken
down
into
its
component
parts.
Each
part,
by
itself,
is
easier
to
read
and
understand
than
the
unsectioned
program.
Once
the
function
of
each
part
is
understood,
the
program
can
be
read
as a
whole
with
better
understanding.
This
compartmentalization
also
simplifies
error
correction.
Errors
can
be
more
easily
isolated
and
the
corrections
are
less
likely
to
have
adverse
effects
on
other
parts
of
the
program.
(1ISG)With
[RCL](()]
When
looking
for
repeating
patterns
in
your
algorithms,
it
is
also
good
practice
to
look
for
sequential
storage
and
recall,
i.e.,
1...
2
..
3,
etc.
Such
sequences
may
be
incorporated
into
subroutines
via
the
((i)]and
((i))
functions
of
the
HP-11C.
This
technique
is
effectively
used
in
the
Matrix
Algebra
program.
Routine
“A”
(lines
079
through
101)
calculates
the
determinant
of
the
3
X
3
matrix
stored
in
Ry
through
R
;.
Mathematically,
the
determinant
is
calculated
as:
Rs
Ry
R5(Rg
XR3—RyXRy)
Rg Ry
Ry|=
—Rg(RgXR3—RyXR}))
R;
R2
Rj
+R7(Rg
X
Ry
—Rg
XR}).
Rearrange
this
to
bring
out the
pattern:
~(RoXRyXR
+RgXR3
xR,
+R;XRgXR)
+R;XRyX
R,
+
Ry
XR3XR,
+Re
XR
XR
|
What
results
is
not
just
the
pattern
R
X
R
X
R
+
but
also
the
sequential
recall
R;
to
R
.
These
two
features
have
been
combined
into
subroutine
9
(lines
001
to
009).
In
this
subroutine
(Increment
and
Skip
of
Greater)
is
used
to
increment
the
I-register
(refer
to
page
128,
Incrementing
and
Decrementing
the
Index
Register).
Each
call
of
the
subroutine
increases
the
value
stored
in
R|
by
1
and
recalls
the
value
stored
in
the
register
indicated
by
the
value
in
R;
([RCL]
[(i)]).
Since
the
fractional
portion
of
the
number
in
the
I-register
is
always
zero
and

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the HP HP-11C and is the answer not in the manual?

HP HP-11C Specifications

General IconGeneral
BrandHP
ModelHP-11C
CategoryCalculator
LanguageEnglish

Related product manuals