150 Section 11: Multiple Programs

Example 1: Assuming that program memory still contains the last program from the preceding section (which consisted of 17 program lines in RPN mode and 23 program lines in ALG mode), store after that program the office-supplies program from Section 8 (page 104). Since this is the second program to be stored in program memory, we’ll ensure that a i000 instruction separates it from the first program by doing step 3 in the procedure above. Furthermore, since this program does not end with a loop, we’ll do steps 5 and 6 too.

Keystrokes

Display

 

 

 

 

(RPN mode)

 

 

 

 

 

 

 

 

 

fs

 

 

Sets calculator to Program mode.

gi.017

017,43,33,002

Sets calculator to last line keyed

 

 

 

into program memory.

gi000

018,43,33,000

Ensures that second program is

 

 

 

separated from first by i000.

\

019,

36

 

 

 

2

020,

2

 

 

 

 

 

 

5

021,

5

 

 

 

 

 

 

b

022,

25

 

 

Keys in program.

 

 

 

-

023,

30

 

 

 

 

 

 

5

024,

5

 

 

 

 

 

 

+

025,

40

 

 

 

 

 

 

 

t

026,

31

Halts program execution.

gi019

027,43,33,019

Branches to beginning of program.

fs

12,000.00

 

Sets calculator back to Run mode.

 

 

 

(Display shown assumes results

 

 

 

remain from running program in

 

 

 

previous example.)

Keystrokes

Display

 

 

 

 

(ALG mode)

 

 

 

 

 

 

 

 

 

fs

 

 

Sets calculator to Program mode.

gi.023

023,43,33,002

Sets calculator to last line keyed

 

 

 

into program memory.

gi000

024,43,33,000

Ensures that second program is

 

 

 

separated from first by i000.

File name: hp 12c pt_user's guide_English_HDPMF123E27

Page: 150 of 275

Printed Date: 2005/8/1

Dimension: 14.8 cm x 21 cm