Branching - HP 25 Owner's Handbook Manual

Programmable scientific calculator
Table of Contents

Advertisement

Programming
87
Overflow Calculations.
Your
HP-25 has been designed
so
that
by looking
at the
display
you can always
tell
why
the
cal-
culator stops.
If program execution
stops
because the result
of
a calculation
in the X-register is
a
number
with a
magnitude
greater
than
9.999999999
x
10
99 ,
all 9's
are displayed
with ap-
propriate
sign.
It is then
easy
to determine the
operation
that
caused
the
overflow
hy
switching
to PRGM mode
and
identi-
fying
the keycode in the display.
If the
overflow occurs
in one
of
the
storage registers,
possibly
the result of
storage
register
arithmetic
or the
summations with
fIJ
,the calculator will
display
~
to
inform
you of
the over-
flow.
Check
the
storage
registers to
see
in
which
register the
overflow has
occurred.
If the
result of a calculation
is
a
number with
a
magnitude less
than
10-
99 ,
zero
will
be
substituted for
the number
and a
running
program
will continue
to
execute
normally
.
Improper
Operation Stops.
Calculations
that
cause
the word
I
Error
I
to be displayed also
stop
program execution. You can
identify the reason
for
the
stop
by
switching
momentarily to
PRGM mode to
see
the keycode
of
the improper
operation. A
list
of
improper
operations can
be found in
appendix
B.
Branching
Although program
execution
is normally sequential, with
one
step
executed
after
another,
execution
can be transferred
or
"branched"
to
any step
in program memory. The
"branch"
can
be made unconditionally or it
can
be made
dependent
on the
outcome
of
a comparison
of data
values.
Unconditional
Branching
You
have
seen
how
miD
is used in manual RUN mode to help
you
display
any step
in program memory. As
an
instruction
exe-
cuted
in
a
program
miD
is used to branch program
execution
to
the
step
number
specified.
It can tell the calculator to execute
step
00 next,
as
we have
already seen,
or to
execute any
other
step
in program memory.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents