Indirect Programcontrol; Indirect Label Branches And Subroutines - HP -11C Owner's Handbook Manual

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

Advertisement

136
Section 9: The Index Register
Example
.
To Execute
|
Keystrokes
Display
Indirect storage register
3.1416
arithmetic; divide the
'
(sTo)(:](i)
3.1416
contents of R3 by pi.
]
(G
0.8422
For an additional discussion of indirect storage register addressing
techniques,refer to page 211,
With
((i))), in part III of this
handbook.
Indirect Program Control
Indirect Label Branches and Subroutines
You can indirectly branch to line numbers and labels in the same
way that you indirectly address data storage registers. The table
on page 131 shows the numerical address that corresponds to each
possible label. Each possible address is the nnnnn portion of a
positive loop control value stored in R;.
To indirectly branch to a label use
(1IJ. When a running
program encounters
(1], execution is transferred downward in
program memory to the label that is indirectly addressed by the
current nnnnn value. For example, if 3.005 is the current counter
value in the Index register...
g e S
006- Instruction
007- [GT0][1]
-
008- Instruction
| Execution
nnnnn
Xxx
yy
009- Instruction
If;%gfge; 30
default
-
io o1)
010- Instruction
B } ——
011-[f](LBL]3
012- Instruction
013- Instruction
The same method is used to indirectly execute a subroutine, except
that [GSB][1]is used instead of [GTO][1].

Advertisement

Table of Contents
loading

Table of Contents