EasyManua.ls Logo

HP HP-67 - Incrementing and Decrementing the I-Register

HP HP-67
364 pages
Print Icon
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...
Controlling
the
I-Register
215
Incrementing
and
Decrementing
the
I-Register
You
have
seen
how
a
number
can
be
stored
in
the
I-register
and
then
changed,
either
by
storing
another
number
there,
or
by
using
the
0
operation.
You
will
find
either
of
these
methods
useful,
whether
you
are
utilizing
them
as
instructions
in
a
program
or
using
them
manually
from
the
keyboard.
Another
way
of
altering
the
contents
of
the
I-register,
and
one
that
is
most
useful
during
a
program,
is
by
means
of
the
B8
(7]
(increment
I,
skip
if
zero)
and
£
(decrement
I,
skip
if
zero)
instructions.
These
instructions
either
add
the
number
1
to
(increment)
or
subtract
the
number
1
from
(decrement)
the
I-register
each
time
they
are
executed.
In
a
running
program,
if
the
number
in
the
I-register
has
become
zero,
program
execution
skips
the
next
step
after
the
(2]
or
instruction
and
continues
execution
(just
like
a
false
conditional
instruction).
The
3
(52)
and
7
instructions
always
increment
or
decre-
ment
first;
then
the
test
for
zero
is
made.
For
test
purposes,
numbers
between
but not
including
—1
and
+1
are the
same
as
zero.
Example:
Here
is
a
program
that
illustrates
how
{8
(5Z)
works.
It
contains
a
loop
that
pauses
to
display
the
current
value
in
the
I-register,
then
uses
the
[}
(5Z)
instruction
to
increment
that
value.
The
program
will
continue
to
run,
continually
adding
one
to
and
displaying
the
contents
of
the
I-register,
until
you
press
(or
any
key)
from
the
keyboard.
To
key
in
the
program:
Slide
the
W/PRGM-RUN
switch
WPrRGM
[[[MIMRUN
to
W/PRGM.
Press
Display
&
0@0n
RCI
Recalls
I-register
contents.
003
35
72|
Pauses
to
display
contents.

Table of Contents

Other manuals for HP HP-67

Related product manuals