EasyManua.ls Logo

HP HP-11C - Page 96

HP HP-11C
264 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...
94
Section
5:
Programming
Basics
Labels
As
you
read
earlier,
the
labels
in
your
programs
act
as
addresses—
they
tell
the
calculator
where
to
begin
or
resume
execution.
Notice
that
when
a
label
is
encountered
as
part
of
a
program,
execution
merely
“falls
through”
the
label
and
continues
onward.
For
example,
in
the
program
segment
shown
below,
if
you
press
[f][A],
execution
would
begin
at
and
continue
downward
through
program
memory,
on
through
the
3
instruction,
until
the
was
encountered
and
execution
returned
to
line
000
and
halted.
When
you
press
[f][A]...
execution
begins
here.
No
(9]
or
here
...
so
execution
falls
through
the
3instruction
...
W
...
and
continues
to
the
[RTN],
then
transfers
to
line
000
and
halts.
Problems
1.
Write
and
load
a
program
that
converts
temperature
in
degrees
Celsius
to
Fahrenheit,
according
to
the
formula
F
=
1.8°C
+
32.
Define
the
program
with
and
and
run
it
to
convert
Celsius
temperatures
of
-40°,
0°,
and
72°.
Answers:
-40.0000°F,
32.0000°F,
161.6000°F.

Table of Contents

Related product manuals