Programming 79
The
illustration on the left shows
program
memory immediately
after pressing
DI PRGM lin
PRGM
mode
or
turning
the
HP-25
ON
.
The
illustration on the right shows program
memory
after
recording the
three-step
example program.
A
mID
@] @]
instruction
in
the program tells the
calculator
to
go to
step
00
and
execute
the
automatic
stop
instruction
there
next.
If
~
is
pressed
again
in
automatic
RUN
mode,
the
calcu-
lator
will begin
executing
instructions from
step
00
as it did the
first time.
Each
time the
calculator
executes
the
program
, it
ends
execution
at
step
00
, ready to begin again.
If
you had
recorded
a 49-step program, after executing
step
49
the
calculator
would
execut
e the
automatic
stop
instruction
stored
in
step
00.
Then
you would have to press
~
to
execute
the program again.
Now
try
an
example.
Example.
Calculate
the surf
ace
area
of
a spherical
"cat's-eye"
(marble) with a
diameter
of
1.3
centimeters.
Then
calculate the
surface
area
of
a baseball with a
diameter
of2.5
inches.
Press Display
15.31
2.5~
119.63
Area
of
the marble
in
square
centimeters.
Area
of
the
baseb
a
ll
in
square
inches.
Each
time you press
~
the
calculator
executes
the
sequence
of
keystrokes
you
have
recorded
.
You
calculate the
same
a
nswers
you would
obtain
if
you did
each
problem manually,
but
without
the time
or
the tedium.
Writing a Second Program
Now
let's
write a
second
program and use it to further
explore
the programming capability
of
your
HP-25 calculator.
Suppose
you
want
to write a program
that
will calculate the increase
in