Running A Program - HP -11C Owner's Handbook Manual

Hide thumbs Also See for HP-11C:
Table of Contents

Advertisement

86
Section 5: Programming Basics
Keystroke
Display
iG}
000-
You can see that the display of program memory has not changed.
It will not change until you press all of the keys required for the
complete instruction. Now press the rest of the keys for the first
instruction.
Keystrokes
Display
LBL
000-
A
001-42,21,11
[f)[LBL}[A]loaded into
program memory.
When a new program memory line number and keycode appear in
the display, they indicate that a complete operation has been
loaded into that line. Remember, nothing is loaded into program
memory until a complete instruction (whether one, two, or three
keystrokes) has been keyed in.
Now load the remainder of the program by pressing the following
keys.
Keystrokes
Display
EN|Eal)
002-
4311
aie
003-
4216
&
004-
20
eG
005-
4332
The program for solving the area of a circle given its radius is now
loaded into your HP-11C's program memory.
Running a Program
Programs are executed in Run mode only. To prepare to run the
Area of a Circle program you loaded in the preceding example, set
the HP-11C to Run mode now by pressing [9 ][P7R].
To run a program, you need only key in any required data and
press [f] and the alpha key ([A] through (E]) that labels your
Section 5. Programming Basics
87
program. To run the circle area program, key in the radius data
and press [f][A].
Example Execution. Calculate the areas of circles having radii
of 7.5 centimeters, 9 inches, and 15.3 meters:
Keystrokes
Display
7.5 A)
176.7146
Square Centimeters
9 (A)
254.4690
Square Inches
15.3 (AA)
735.4154
Square Meters
How the Calculator Searches For a Label. When you set the
HP-11C to Run mode, the calculator was positioned at line 005 of
program memory (the last line you filled with an instruction when
you were loading the program.) When
you pressed
[f} [A], the
calculator
began
to search
sequentially
downward
through
program
memory,
beginning
with line 005, for a
ic)
instruction. When
the calculator searches, it does not execute
2.
No further lines of program
memory were occupied,
program instructions.
ay
'
your HP-11C returned to line 000 and
|
Because:
1,
Line 005 did not contain the
(Cet) (Alinstruction, and
through program memory. When the
calculator
found
the [f)
(A)
instruction at line 001 it then began
executing your program.
=
'
'
I
I
i
1
1
resumed
searching
downward
'
1
1
LE
End of Occupied
Program Memory
Executing Program Instructions. The calculator executes the
instructions in the order you keyed them in, performing the [3]
operation in line 002 first, then [f] [x] in line 003, etc., until it
executes a [9] [RTN] instruction, a
(run/stop) instruction, or
encounters the end of occupied program memory. Since there is a
9] (RTN) instruction in line 005, execution returns to line 000 and
halts. The result of the calculation, the value in the X-register, is

Advertisement

Table of Contents
loading

Table of Contents