Programming the Function Keys
By "defining" the function keys, you can create a menu that lets you transfer control to any of several locations in the program, depending on the function key you press.
Definable Function Keys
During normal calculator operation, the function keys are defined by the system menus. For example, when you press [ CONV ], the calculator defines the function keys to provide a variety of conversions.You can create your own function-key definitions by executing a [ 2nd ] [ DFN ] instruction within a program (DFN cannot be used as a keyboard command). The DFN (define) instruction is followed by a field that specifies:
- The function-key to define.
- The three-character message to display above the key. (This lets you display information to describe the definition of the key.)
- The label of the program segment to execute when you press the function key. (The sequence of instructions following the label determines what operations are performed when you press the key.)
The three-character message above the function key is not displayed until program execution is stopped or paused.
Storing the Instruction
To include a DFN instruction in a program:- Press [ 2nd ] DFN.
- Press the function key ( [ F1 ] - [ F5 ] ) you are defining.
- Enter the three character message you want displayed above the key. If your message has fewer than three characters, use spaces as blank characters.
- Enter the label where you want to start execution when the function key is pressed.
Example
The following keystrokes store a DFN instruction in program memory. This instruction displays "SUB" above [ F1 ] and instructs the calculator to transfer program execution to label AA when you press [ F1 ].Procedure | Press | Display |
---|---|---|
Define [ F1 ] key | [ 2nd ] [ DFN ] | |
Select the function key | [ F1 ] | |
Enter description | SUB | |
Enter label | AA |
☚ Back