Section 10: Program Editing 143

4.Key in the original instruction or instructions, beginning with the first instruction to be executed after the added instruction(s), and continuing through the last instruction you keyed into program memory.

Note: If program memory includes branches to program lines following that

at which the first new instruction is being added, remember to change the line number(s) specified in the i instruction(s) — as described above under Changing the Instruction in a Program Line — to the actual new line number(s).

Example: Assuming you have made the program modifications as in the preceding example, suppose you now wanted to insert a t instruction before the program calculates net income after tax so that the program will display the amount of the tax before displaying the net income after tax. The program should be modified by making the changes below:

Keystrokes (RPN mode)

fs gi.008

t

-

fs 15000t

t

Keystrokes (ALG mode)

fs gi.011

t

Display

 

 

 

 

Sets calculator to Program mode.

008,

25

Sets calculator to last program

 

 

line to be executed, which

 

 

contains the binstruction.

009,

31

Keys in new instruction.

010,

30

Keys in original instruction, which

 

 

was replaced by new instruction

 

 

added.

12,000.00

 

Sets calculator back to Run mode.

3,000.00

 

Twenty percent tax on $15,000

 

 

income.

12,000.00

 

Net income after tax.

Display

 

 

 

 

Sets calculator to Program mode.

011,

36

Sets calculator to last line keyed

 

 

into program memory for original

 

 

program.

012,

31

Keys new instruction into

 

 

program line 012.

File name: hp 12c pt_user's guide_English_HDPMF123E27

Page: 143 of 275

Printed Date: 2005/8/1

Dimension: 14.8 cm x 21 cm