Adding Instructions By Branching - HP -10C Owner's Handbook Manual

Hide thumbs Also See for HP-10C:
Table of Contents

Advertisement

Keystrokes
500¦
¦

Adding Instructions by Branching

With branching, you can use a t instruction to move program execution to
a new line sequence after the current end of your program. A second t
instruction then returns execution to the main body of the program.
The new line sequence must begin at the second line after the end of the original
program in order to preserve the automatically recorded t00 instruction
(which tells the calculator to stop and return to the beginning of the program
when the program is done).
1. In Program mode, set the calculator to the last program line to be
executed before the added instruction(s).
2. Key in a t instruction that specifies the second line after the last
line of your program(s).
3. Set the calculator to the last line of your program(s) and key in a
t00 instruction.
4. Key in the instruction(s) being added.
5. Key in the instruction that was replaced by the t instruction keyed
in at step 2.
6. Key in a t instruction to return to the first line (in the original
program) to be executed after the new instruction(s).
Example: Suppose you now wanted to have the program in the preceding
example sum the sale amounts for all the times the program is run. Let's use
storage register arithmetic in register R
the instruction O+3 before the current program line 01. Since the
addition of this one line by simple replacement would require that lines 01
through 10 be re-keyed in, it is quicker to add the instructions by branching
(since branching only requires four extra lines—not counting the new
instructions, which are identical in each case).
The following illustration shows how branching occurs in the edited program.
Section 7: Program Editing
Display
10.00
50.00
to do this. This means we need to add
3
Percent commission rate
for a $500 sale.
Commission for a $500
sale.
85

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents