Reference Section


Use this section as a source of reference information on the test and flag instructions.


Test Functions

[ TESTS ]

Displays the tests menu. Test functions can be executed only as program instructions.

[ TESTS ] { IF> } nnn or X

Tests if the value in the numeric display register is greater than the value in data register nnn or X. If the test result is true, program execution proceeds normally. If the test result is false, the instruction following the test is skipped.

[ TESTS ] [ INV ] { IF> } nnn or X

Tests if the value in the numeric display register is less than or equal to the value in data register nnn or X. If the test result is true, program execution proceeds normally. If the test result is false, the instruction following the test is skipped.

[ TESTS ] { IF< } nnn or X

Tests if the value in the numeric display register is less than the value in data register nnn or X. If the test result is true, program execution proceeds normally. If the test result is false, the instruction following the test is skipped.

[ TESTS ] [ INV ] { IF< } nnn or X

Tests if the value in the numeric display register is greater than or equal to the value in data register nnn or X. If the test result is true, program execution proceeds normally. If the test result is false, the instruction following the test is skipped.

[ TESTS ] { IF= } nnn or X

Tests if the value in the numeric display register is equal to the value in data register nnn or X. If the test result is true, program execution proceeds normally. If the test result is false, the instruction following the test is skipped.

[ TESTS ] [ INV ] { IF= } nnn or X

Tests if the value in the numeric display register is not equal to the value in data register nnn or X. If the test result is true, program execution proceeds normally. If the test result is false, the instruction following the test is skipped.

[ TESTS ] { DSZ } nnn or X

Decrements the value in data register nnn or X (or increments the value if it is negative). After decrementing the register value, the calculator tests if the value equals zero. If the value is equal to zero, the instruction following the test is skipped. If the value is not equal to zero, execution proceeds normally.

The rules for decrementing the register value are: values greater than 1 are decreased by 1, values less than -1 are increased by 1, and values between -1 and 1 are set to zero.

[ TESTS ] [ INV ] { DSZ } nnn or X

Decrements the value in data register nnn or X (or increments the value if it is negative). After decrementing the register value, the calculator tests if the value equals zero. If the value is not equal to zero, the instruction following the test is skipped. If the value is equal to zero, execution proceeds normally.

The rules for decrementing the register value are: values greater than 1 are decreased by 1, values less than -1 are increased by 1, and values between -1 and 1 are set to zero.

[ TESTS ] { Y/N }

Defines [ F1 ] as { YES } and [ F2 ] as { NO } and stops program execution. If { YES } is pressed, execution proceeds normally. If { NO } is pressed, the instruction following the { Y/N } instruction is skipped.

Note:

The { Y/N } function definitions are treated like a user-defined menu by the calculator. Therefore, pressing [ OLD ] will restore the { Y/N } menu after it has been cleared by a system menu. To clear the { Y/N } definitions in a program, use the [ 2nd ] [ DFN ] [ CLEAR ] or [ 2nd ] [ DFN ] Fx [ CLEAR ] key sequence.

Flag Functions

[ FLAGS ]

Displays the flags menu. The calculator has 100 flags. Flags 00-14 are general purpose flags that can be used as desired in a program. Flag 15 is the halt-on-error flag. Flags 16-23 are reserved for use by programs in the software library cartridges. Flags 24-99 are system flags. Appendix C lists the system flags used by the calculator.

[ FLAGS ] { CF }

Clears (resets) user flags 00-14. The instruction mnemonic for [ FLAGS ] { CF } is CF.

[ FLAGS ] { SF } nn

Sets flag nn. Flags 00-15 can be set from the keyboard or within a program. Unless the calculator is in the unprotected mode, flags 16-99 can be set only from within a program. (Unprotected mode is described in Appendix A.)

[ FLAGS ] { RF } nn

Resets flag nn. Flags 00-15 can be reset from the keyboard or within a program. Unless the calculator is in the unprotected mode, flags 16-99 can be reset only from within a program.

[ FLAGS ] { TF } nn

Tests is flag nn is set. If flag nn is set, execution proceeds normally. If flag nn is reset, the instruction following the test is skipped. This function can be executed only as a program instruction.

[ FLAGS ] [ INV ] { TF } nn

Tests is flag nn is reset. If flag nn is reset, execution proceeds normally. If flag nn is set, the instruction following the test is skipped. This function can be executed only as a program instruction.

Back