Section 8: Programming Basics

99

Pressing the gu keys is not necessary when we do the calculations manually, since in Run mode the result of every intermediate calculation is displayed automatically; but we’ll include u instructions in the program so that the intermediate results AMOUNT and TAX are automatically displayed when the program is executed.

Keystrokes

6.75?0

fCLEAR²

13

\

68.5

§

?+1:0 b ?+2

+

?+3

Display

6.75Stores tax rate in R0.

0.00Clears the registers in R1 through

R6.

13.Keys in quantity of item.

13.00Separates quantity of item from cost of item to be keyed in next.

68.5Keys in cost of item.

890.50AMOUNT.

890.50Adds AMOUNT to sum of AMOUNT entries in register R1.

6.75Recalls tax rate to display.

60.11TAX.

60.11Adds TAX to sum of TAX entries in register R2.

950.61TOTAL.

950.61Adds TOTAL to sum of TOTAL entries in register R3.

Now, we’ll store the program in program memory. Do not key in the quantity and cost of each item; these numbers will vary each time the program is run.

Keystrokes

Display

 

 

fs

00-

 

 

Sets calculator to Program

 

00-

 

 

mode.

fCLEARÎ

 

 

Clears program memory.

§

01-

 

20

 

gu

02-

43

31

Pauses to display AMOUNT.

?+1

03-

44 40

1

 

:0

04-

45

0

 

b

05-

 

25

 

File name: hp 12c_user's guide_English_HDPMBF12E44

Page: 99 of 209

Printered Date: 2005/7/29

Dimension: 14.8 cm x 21 cm