HP 0012C-90001 User Manual page 98

12c financial calculator
Table of Contents

Advertisement

98
98
Section 8: Programming Basics
Section 8:
Programming Basics
98
98
Section 8:
Section 8:
Programming Basics
Programming Basics
Example: Create a program that calculates the entries in the AMOUNT, TAX, and
Example:
Example:
Example:
TOTAL columns for each item on the jewelry distributor's invoice shown on the next
page, and also calculates the total in each of these columns for all items on the
invoice. Assume the sales tax is 6
To conserve lines of program memory, instead of keying in the tax rate before the
b instruction we'll store it in register R
Before storing the program in program memory, we'll calculate the required
amounts for the first item on the invoice manually. The keystroke sequence will use
storage register arithmetic (described on page 24) in registers R
calculate the column sums. Since these registers are cleared when fCLEAR² is
pressed, we'll press those keys before beginning the manual calculation — and
also later, before running the program — to ensure that the column sums are
"initialized" to zero. (Pressing fCLEARH would clear registers R
but would also clear R
3
/
%.
4
and recall it before the b instruction.
0
, which will contain the tax rate.)
0
, R
, and R
to
1
2
3
through R
,
1
3

Advertisement

Table of Contents
loading

Table of Contents