122 Section 11: Multiple Programs

Example 2: With the two programs now stored in program memory from the preceding examples (occupying 27 program lines), store the amortization program from Section 9(page 103). Since there are already two programs stored in program memory, we’ll skip step 3 in the procedure above. Furthermore, since the amortization program ends with a loop, we’ll skip steps 5 and 6. When the amortization program was stored at the beginning of program memory, the i instruction at the end of the program branched to the :0 instruction in line 02. Since the :0 instruction is now in line 29, we’ll specify that line number with the

iinstruction in line 34.

Keystrokes fs

gi.27?0 :0 f! gu

~

gu gi29

Display

 

 

 

 

 

00-

 

 

Sets calculator to Program

 

 

 

mode.

27- 43, 33

19 Sets calculator to last line keyed

28-

44

0

into program memory.

 

 

 

29-

45

0

 

 

 

 

 

 

30-

42

11

 

 

 

31-

43

31

 

 

Keys in program

32-

43

34

 

 

 

 

 

 

33-

31

 

 

 

34- 43, 33

29

 

 

 

Running Another Program

To run a program that does not begin with program line 01:

1.Press fsto set the calculator to Run mode. If the calculator is already in Run mode, skip this step.

2.Press gifollowed by two digits that specify the first line of the program.

3.Press t.

Example: Run the office-supplies program, now stored in the calculator beginning at program line 19, for the typewriter listing for $625.

Keystrokes

Display

fs

12,000.00

gi19

12,000.00

625t

473.75

Sets calculator to Program mode.

Sets calculator to first line of program to be executed.

Net cost of typewriter.

File name: hp 12c_user's guide_English_HDPMBF12E44

Page: 122 of 209

Printered Date: 2005/7/29

Dimension: 14.8 cm x 21 cm