Section 14: Flags217
When flag 21 is clear, it is assumed that you do not have a printer in your HP-41C system. Programs that contain specific printing functions (refer to the printer owner’s handbook) will run properly but will not print. With the printer plugged in and flag 21 clear, execution (in a program) of one of the print functions results in the PRINTER OFF display. But if the printer is not present—the display will show NONEXISTENT. In both cases, execution halts.
On the other hand, if flag 21 is set, the calculator assumes that a printer is present in the system and the HP-41C attempts to print. If a printer is still not present, execution of specific print functions result in the NONEXISTENT display. In addition, the standard HP-41C functions VIEW , AVIEW and PROMPT (which normally cause printing when flag 21 is set and the printer is present) will perform their normal functions and will also halt execution.
The status of this flag is set to match the status of flag 55 (the printer existence flag) each time the HP-41C is turned on. (Flag 21 and 55 are both set if the printer is present and clear if not.)
Data Entry Flags
There are two flags in the HP-41C that are used to detect keyboard data input: the numeric input flag (22) and the ALPHA input flag (23).
Flag 22 is used to detect numeric data input. The HP-41C automatically sets flag 22 when numeric data is entered from the keyboard.
Flag 23 is similar to flag 22 except that it is used to detect ALPHA data input. The calculator sets flag 23 when ALPHA data is entered from the keyboard.
Both flags 22 and 23 are cleared each time you turn the calculator on.
Example: Computer programming student Jill Bitter is a little confused about how to use hexadecimal numbers (base 16). Her teacher suggests that she write a program on her HP-41C to convert hexadecimal numbers to decimal numbers. Jill’s first program is below. It converts a single-digit hexadecimal number to decimal.