EasyManua.ls Logo

HP HP-67 - Page 251

HP HP-67
364 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...
Using
the
I-Register
for
Indirect
Control
247
Rapid
reverse
branching
using
(i
and
(2
(i
are
extremely
useful
instructions
as
part
of
your
programs.
Rapid
reverse
branching
permits
you
to
transfer
execution
to
any
step
number
of
program
memory.
With
a
negative
number
stored
in
the
I-register,
the
resulting
step
number
can
always
be
found
by
combining
the
negative
number
in
I
with
the
step
number
of
the
(@
or
(7 (@
instruction.
Execution
can
even
be
transferred
backward
past step
000.
To
find
the
resulting
step
number
of
program
memory,
find
the
sum
of
the
negative
number
in
the
I-register
and
the
step
number
containing
the
@
or
{@
instruction,
then
add
224.
Thus,
if
the
I-register
contained
—12
and
a
(@
instruction
were
encountered
in
step
007,
execution
would
be
transferred
to
step
219
of
program
memory
(7
12
+
224
=
219).
Example:
Named
after
a
13™-century
mathematician,
the
Fibonacci
series
is
a
series
of
numbers
that
expresses
many
relationships
found
in
mathematics,
architecture,
and
nature.
(For
example,
in
many
plants,
the
proliferation
of
branches
follows
a
series
of
Fibonacci
numbers.)
The
series
is
of
the
form
0,1,1,2,3,5,8,
13
...,
where
each
element
is
the
sum
of
the
two
preceding
elements.
The
program
on
page
248
contains
an
infinite
loop
that
generates
and
displays
the
Fibonacci
series.
Although
you
normally
would
probably
not
set
up
a
single
routine
that
began
in
step
211
and
continued
through
step
008,
the
routine
illustrates
how
the
[
instruction
coupled
with
a
negative
number
in
the
I-register
can
transfer
program
execution
back
in
program
memory,
even
past
step
000.

Table of Contents

Other manuals for HP HP-67

Related product manuals