HP (Hewlett-Packard) HP-42S Calculator User Manual


 
12 Flags
The HP-42S has 100 flags from 00 to 99. A flag is a “binary memory” which works as an indicator
of calculator's status. A flag can be “set”(true) or “clear”(false). Just for comparison 33S has only 12
flags.
But why do we need flags? Why not set up the calculator status using just the default menus? For
me the most interesting reason is related to programming. Using flags you can get the status of the
calculator or change it from a program.
To work with flags there are some functions in ▀ FLAGS menu (over the “6”) which are
SF, CF, FS?, FC?, FS?C, FC?C. (Again HP-42S has more functions than we need)
SF: Set flag. Makes a flag to be set(true).
CF: Clear flag. Makes a flag to be clear(false)
FS?: Flag set test. Says if the flag is set(true)
FC?: The same for clear(false)
FS?C: The same of FS? and CF together.
FC?C: The same of FC? and CF together.
Now let's study some of the flags.
00 to 10 and 81 to 99: These 30 flags are not related to the calculators status but are just “binary
memories” you can use for what you want.
11: When you turn on the calculator if the flag 11 is set the calculator runs the program where the
“calculator's pointer” is stopped and clears the flag 11.
24: If this flag is set the calculator will ignorate error messages. “Out of Range” will appear as
9.99999999999E499 in the HP-42S and as 1.7977E308 in Free42. This is important if you want to
prevent an unwanted stop during a program.
26: Turns audio on.
28: Use '.' instead of ',' (default).
29: If set the calculator separates digits in groups of three. For example: 5000000 becomes
5,000,000. (default)
You cannot change the flags from 36 to 80.
44: Always on. If true the calculator does not turn off after about 10 minutes.
65: Matrix editor.
68 to 71: Base modes. CCCC=Decimal (default), CCCS=Binary, CSSS=Octal and
SSSS=Hexadecimal. It is a shame! Why not only two? :)
73: This flag if true makes the calculator to show complex numbers in polar notation.