Section 14
Flags
Flags
The HP-41C flags are an important programming tool in your calculator. A flag actually is a memory that can either be SET or CLEAR. A running program can then test the flag later in the program and make a decision, depending on whether the flag was set or clear.
There are 30 ‘‘user’’ flags (numbered 00 through 29) available in your HP-41C. In addition, there are 26 ‘‘system’’ flags (numbered 30 through 55) that have limited uses to you in your programs. On pages 210 and 211 are tables showing HP-41C flags and their basic capabilities. The HP-41C has six functions that allow you to manipulate the flags.
 
Three of the flag functions are on the normal mode keyboard. They are:
  SF    (set flag)
  CF    (clear flag)
  FS?    (‘‘flag set’’ test)
The other flag functions are not on the keyboard, but can be assigned to the keyboard for execution in USER mode, or executed from the display (refer to section 4). These flag functions are:
  FC?    (‘‘flag clear’’ test)
  FS?C    (‘‘flag set’’ test and clear)
  FC?C    (‘‘flag clear’’ test and clear)
When you execute one of the six flag functions, the HP-41C prompts you for the flag number (00 through 55) you wish to operate upon.
209