More Than One Program In The Memory - HP -42S Manual

An alternative: hp-42s calculator and free42 simulator for palmos
Hide thumbs Also See for HP-42S:
Table of Contents

Advertisement

18 ÷
19►STOP
Finally we enter the last part of the program and after this we have
27 ×
28►÷
If you move using the cursors you will find .END. in line 29 (which is the end of the program) and
in line zero we find 00►{ 31-Byte PRGM }. Almost 1 byte per line of program.
As we said the HP-42S has about 7200 bytes of memory. Not bad! Just for comparison, the HP-32S
had 390 bytes and spent about 1.5 bytes per line. The HP-20S had only 99 lines/steps and the HP-9G
had 400 steps while HP-33S has 31KB (but hardly can take advantage of this due to a limit of 26
memories/labels, which is the same of 32S, and it spends about 3 bytes per line).
After entering the program just press EXIT. Now enter the numbers a, b and c of the equation into
R
, R
and R
. For example for the equation x
00
01
02
STO 02. Now we just press R/S (to run the program) and we get 1, and pressing it again we have 4.

6.2 More than one program in the memory

If we want to have more than one program in the memory we can use more than one program space.
To create another program space just press
The
GTO
command can be used in two different situations:
1. You are not in the programming mode. In this case you can use
another empty program space, but this happens only if the current mode is not already empty.
You can use
You can also use
program spaces. (In this case I must admit 33S is better because the lack of this
complication)
2. You are in programming mode. In this case you cannot change the program space.
You can use
of the line where you want to go. (This will happen and it is not programmed)
You can use
when executed to jump to that label)
But what is a label? A label is a name we give to a position in the program using the LBL command
which is available in
programming mode ( PRGM) and then just press LBL and then enter a name (1 to 7 letters). If you
use only one letter it is local to the current program and not visible elsewhere, and thus won't appear
automatically when you press XEQ (just for comparison, in the 33S all labels are just one letter).
Example: In the programming mode
LBL "AAA" in the program. So when the program is running a statement such as GTO "AAA" is
encountered (for example), the program will jump to the line which has the LBL "AAA" instruction.
(Please note we don't need to press
01 LBL "AA"
02 GTO "AA"
03 .END. (you don't enter this)
GTO
"label". (We will see this below)
GTO
followed by "END" or ".END." etc to move among
GTO
._ _ _ _ to move to a line where in the "_"'s you put the number
GTO
"label" (This will be programmed and will cause the program
PGN.FCN
("program functions") menu. To create a label you must be in the
PGN.FCN
ALPHA
2
– 5x + 4 =0 we enter 1 STO 00 5 +/– STO 01 4
GTO
.
. .
LBL AAA creates a label "AAA" which appears as
to access the A, B, C, etc in this case). For example:
GTO
.
. to create

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

42sFree42

Table of Contents