84 Section 7: Program Editing
Adding Instructions Within a Program
If instructions are to be added within a program—or at the end of a program
which is not the last one in memory—simply keying them in will replace the
instructions previously stored in those program lines. The contents of all higher
numbered program lines will remain unchanged. Then, the replaced (written-
over) instructions need to be added back. This can be done by re-keying in these
and all remaining instructions. (Refer to Adding Instructions by Replacement.)
Alternatively, new instructions can be added by branching outside the
program(s) to add lines. (Refer to Adding Instructions by Branching.)
Adding Instructions by Replacement
1. In Program mode, set the calculator to the last program line to be
executed before the added instruction(s).
2. Key in the new instruction(s).
3. Re-key in the original instructions, starting with the first one written
over by a new instruction. (Remember to alter t line numbers as
necessary.)
Example: With the sales commission program, test value (in R
0
), and
commission rates (in R
1
and R
2
), from the preceding section still stored in the
calculator, let's insert a new instruction. Add a ¦ instruction before the k
instruction so that the program will display the commission rate before
displaying the amount of commission. Since there is only one instruction (k)
to be keyed back in, it is simplest to add the ¦ instruction by replacement,
as follows:
Keystrokes Display
¥
00-
Sets calculator to
Program mode.
t.07
07- 45 1
Sets calculator to last
program line to be
executed, which contains
thel1 instruction.
¦
08- 31
Keys in new instruction.
k
09- 21
Keys in original
instruction which was
replaced by new
instruction.
¥
Sets calculator back to
Run mode. (Display will
show results remaining
from last calculation.)