Section 13

Flags

Besides the conditionals (x=y?, x>0?, etc.) and the tests for zero (ISZ (i), DSZ (i), ISZ I, DSZ I), you can also use flags for tests in your programs. A flag actually is a memory device that can be either SET (true) or CLEAR (false). A running program can then test the flag later in the program and make a decision, depending upon whether the flag was set or clear.
There are four flags, F0, Fl, F2, and F3, available for use in your HP-97. To set a flag true, use the instruction STF (set flag) followed by the digit key (0, 1, 2, 3) of the desired flag. The instruction CLF (clear flag) is used for clear flags.
When using flags, decisions are made using the instruction F? (is flag true?) followed by the digit key (0, 1, 2, 3) specifying the flag to be tested. When a flag is tested by an fF? instruction, the calculator executes the next step if the flag is set (this is the “DO if TRUE” rule again). If the flag is clear, the next step of program memory is skipped before execution resumes.

Command-Cleared Flags

There are two types of flags. Flags F0 and Fl are command-cleared flags—that is, once they have been set by an fSTF 0 or fSTF 1 operation, they remain set until they are commanded to change by the fCLF 0 of fCLF 1 operations. Command-cleared flags are generally used to remember program status (e.g., are printed outputs desired?).
  231