Introduction


As you enter a program, the calculator does not execute your keystrokes. Instead, it stores the keystrokes in a series of numbered memory locations called program steps. The number of program steps is controlled by the memory partitioning of the calculator.


How Are Programs Stored?

Each program step is identified by a unique four-digit address. The first step is program address 0000. As a general rule, each keystroke is stored in a separate step. However, there are several exceptions.
  • Second functions, such as [ 2nd ] [ x! ] are combined into a single step. Only the actual operation, x!, in this example, is stored.
  • Menu functions, such as [ CONV ] { MET } { F-C }, are stored as a single step. Only the actual function, { F-C } in this example, is stored.
  • Functions that require a field, such as [ STO ] 007, are stored in two or more steps - one for the instruction and one or more for the field.
  • There are two inverse function key sequences in which [ INV ] combines with the function key sequence it precedes. These two functions, SBR and GTO, are discussed in "Sequence of Operations".

Arrangement of Program Steps

The following table can help you visualize the arrangement of program steps in memory. The "Address" column gives the number assigned to each program step.


Address

Program Step


0000INV
0001LOG
0002+
00035
0004x!
0005=
0006STO
0007A
0008HLT
0009NOP
Any unused steps automatically contains a NOP (no-operation) instruction.

What is an Instruction?

Once a function is stored in program memory, it is referred to as a program instruction. A program instruction is a key or key sequence that forms a complete function. For example:
  • [ yˣ ] is an instruction.
  • [ 2nd ] [ x! ] is an instruction.
  • [ RCL ] A is an instruction.
  • [ STO ] [ + ] 007 is an instruction.
  • [ 2nd ] [ FIX ] 2 is an instruction.

What is a Mnemonic?

The symbol displayed by the calculator when you store a function in program memory is called a mnemonic. The mnemonic displayed for primary and second functions generally corresponds to the symbol shown on the keyboard. For some functions, the mnemonic is an abbreviated form of the key symbol.

Some examples of the mnemonics displayed for calculator functions are listed below.


Key Sequence

Mnemonic


[ CLEAR ]CLR
[ × ]*
[ ÷ ]/
[ +/- ]+/-
[ x~t ]x~t
[ 2nd ] [ nPr ]nPr
[ INCR ] AINC A
[ STO ] [ + ] 007ST+ 007

How Are Programs Executed?

When you run a program, the calculator sets an internal pointer, called a program counter to the first program step. It then executes the instruction stored a that location. After the proper action is accomplished, the program counter advances to the next instruction.

The calculator continues to advance the program counter and execute instructions until one of the following events occurs.
  • You stop the program by manually pressing the [ BREAK ] or [ HALT ] key.
  • The program is stopped by an instruction stored in the program, such as [ BREAK ] or [ HALT ].
  • The program counter reaches the end of program memory, which causes an error condition that stops execution. (Certain other errors also cause program execution to stop. See Chapter 5 for details.


Back