96 Section 8: Programming Basics
required amounts for the first item on the invoice manually. The keystroke
sequence will use storage register arithmetic (described on page 25) in registers
R
1
, R
2
, and R
3
to 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
1
through R
3
, but would also clear R
0
, which will contain the tax rate.)
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.
!"# " $ %
&
'
()&*&+
,&
*&)
+, - +
!"
#$ %&' !()
*+, -. *(.
#/$ !0(.