
112 Section 10: The Index Register and Loop Control
Indirectly recalls contents of R
.2
.
Check: same contents recalled by
directly addressing R
.2
.
Exchanging the X-Register
Exchanges contents of R
I
and X-
register.
Exchanges contents of R
2
(which is
zero) with X.
Check: directly address R
2
.
Storage Register Arithmetic
New contents of R
I
(= old + 10).
Divides contents of R
.2
by .
Check: directly address R
.2
.
Example: Loop Control with e
Remember the program in section 8 which used a loop to calculate
radioactive decay? (Refer to page 93.) This program used a test condition (x
y?) to exit the loop when the calculated result passed the given limit (50).
As we've seen in this section, there's another way to control loop execution:
through a stored loop counter that is monitored by the I or e
function.
Komentáře k této Příručce