System Flags

System Flags HP49 FLAGS

HP48G Series calculators show 38 FLAGS in the SYSTEM FLAGS MODE.
There are 64 flags, but only 38 are displayed in the SYSTEM FLAGS.
They begin at  01  and skip many times from a number to another as the series below.

01 02 03 14 19 20 21 22 27 28 29 31 32 33 34 35 36 37 38 39 40 41 42 43 44
51 52 53 54 55 56 57 58 59 60 61 62 63

The default for flags is CLEAR.


Fig 1 - Access to Flags

Fig 2 - The flags


What is a flag?

Flag is an indicator that say if a function is active or not.

They exist to allow the user customise the calculator acording wish.
Flags are very usefull and it is easy to learn how to use them .
Ok! Lets go!
You can access flags using the comands  [MODES] and pressing [FLAG] in menu (fig 1).
Use the arrow sets    to access flags and  to set the flag.
I will not list the flags here.
You can find it in the chapter 4 and in the appendix D of the USER'S GUIDE.



Flag Commands


Keyboard access:
[MODES] [FLAG]

SF - set flags
CF - clear flags
FS? - return 1 to the stack if flag is set or 0 if it is clear
FC? - return  1  to the stack if flag is clear and 0 if it is set
FS?C - test if the flag is set, then clears the respective flag
FC?C - test if the flag is clear, then clears the respective flag
STOF - store flags in a binary integer format
RCLF - recall the binary integer number stored by STOF
RESET - reset all flags



How Flags affect calculations
and the interactive mode of HP48


Flags affects the interactive mode of HP48.

Example:
If you have a function like y =sin( p ) and apply it to    [SOLVE]

you will have as result: ' SIN( p ) '
if flag - 02 is set constant symbolic
or the correct result
0 (zero)
if  flag - 02 is set constant numeric.

Of course, if you need a numeric or symbolic result
you need set flag - 02 according to the result you wish.



How Flags affect HP programs 

Many programs and functions cannot work properly if a flag is not set correctly.

Example

<< 1400 1 BEEP>>

It emits a beep of 1400 Hz during 1 second.

If FLAG -56 set STANDARD BEEP OFF it will not work.  

You need set flag -56 STANDARD BEEP ON  to it work.

To avoid this set the flag inside the program

<< - 56 CF 1400 1 BEEP>>

Many times a flag can remain active and affects others programs.
An alternative is rewrite the flag (with oposite SF or CF ) in the end of the program.

<< - 56 CF 1400 1 BEEP -56 SF >>


However, the best alternative is to use RCLF and STOF .

This example maintain ALL the original flags working, in spite of the flag
  - 56 CF be set also inside the program.

<< RCLF F
<< -56 CF 1400 1 BEEP F STOF>>
>>


 
This programs will emit a beep during 1 second. Set flag 56 STANDARD BEEP IS OFF and run it.
It will emit a beep.  After it run press [ENTER] with the stack clear, and you will see you don't hear
the beep because now the original flags, preserved by RCLF and STOF are working.



User Flags
HP48 has also 64 user flags (positive flags from 1 to 64),  
not used for resident functions. 
When user flags are active a little number appears in status area. 
Type {1 2 3 4 5 } CF to get free of them.

Numbers at the status area


HP49 Flags

New flags was included in HP49.
HP49 has 120 flags, but some flag does not appear in the menu flags.
Flags from 01 to 63 are the same flags used in HP48 and flags from 64 to 120 are new.

These are some of the most used flags in HP49

67 - Digital / Analog Clock
Default - Digital Clock
Set - Analog clock

95 - operating mode SYMBOLIC / RPN
Default - Algebraic
Set - RPN
Note: this flag does not appear in the menu flags

117 - Choose Boxes / Soft Menus
Default - Choose Boxes
Set - Soft menu



HP49 Flags



Everything worth if the soul is not short.
- Fernado Fessoa