HP -25 Owner's Handbook Manual page 93

Table of Contents

Advertisement

Tokey in the program set the mode switch to PRGM erev [ #o
and press
to clear program memory and display
step 00. Then key in the list of keys shown below.
Press
Display
(o]
01
00
(]
02
23 01
Store zero in R;.
03
24 01
Recall the current number for
squaring.
9]
04
15 02
Square the number.
B
05
14 74
Display the square briefly.
(1]
06
01
07 23 51 01
Increment the number in R, by
one
B (o][3]
(08
13 03
Transfer program execution to
calculate the next square.
The program calculates the square of the number in storage
register Ry, starting with zero. It pauses to show the answer and
then increments the contents ofthe register by one. The uncon-
ditional branch at the end of the program is used to transfer pro-
gram execution back to step 03 so that the calculation can be
repeated with the new value in register R,.
To run the program set the PRGM-RUN switch to RUN
erow [ = and press 77 =ncw Jso that the calculator will be-
gin execution from step 00. Then simply press
. The
squares of consecutive whole numbers will be shown one by
one in the display. Press[R/S]again to stop execution whenever
you wish.
Conditional Branching
Eight different program instructions give the HP-25 the ability
to make decisions within a program depending on the outcome
of a comparison of data values. These ''conditionals' transfer
program execution based on the outcome of the test. If the
answer is YES, program execution continues sequentially
downward. If the answer is NO, the calculator branches

Advertisement

Table of Contents
loading

Table of Contents