Section 10: The Index Register and Loop Control
False (nnnnn > xxx)
loop
For e: given nnnnn.xxxyy, decrement nnnnn to nnnnn - yy, compare
it to xxx, and skip the next program line if the new value satisfies nnnnn ≤
xxx. This allows you to exit a loop at this point when nnnnn becomes less
than or equal to xxx.
For example, loop iterations will alter these control numbers as follows:
Operation
I
e
Examples
Examples: Register Operations
Storing and Recalling
Keystrokes
´ CLEAR Q
12.3456
O V
7 ¤
O%
lV
instruction
´sV
t.
Instruction
0
1
0.00602
2.00602
6.00002
4.00002
Display
12.3456
12.3456 Stores in R
2.6458
2.6458
12.3456 Recalls contents of R
True (nnnnn xxx)
1
Iterations
2
4.00602
2.00002
Clears all storage registers.
I
Storage in R
(R
= 12.3456).
I
exit loop
3
6.00602
(skip next
line)
0.00002
(skip next
line)
.
by indirect addressing
.2
.
I
111
4
8.00602