taocp

This site has no text of the book. Keep your own copy of TAOCP next to it. See what is checked.

Exercise · Volume 1 · 1.3.1-11

Exercise 1.3.1-11

not stated yet in Lean solution written

Rating15
KindK3, find a value: compute a number, a set or a closed form from the written solution
SectionSection 1.3.1 of Volume 1. Companion chapter: Description of MIX

The task

List the operators that can change rI1.

The exact wording is in your copy of the book.

Hints

Open one hint at a time. Try the exercise again after each.

Hint 1

Look at the loads, the address transfers and the one instruction that moves data to an index register by itself.

Solution

Show the solution

The operators are LD1, LD1N, ENT1, ENN1, INC1, DEC1 (all with code 9,17,499, 17, 49), and MOVE, because it increases rI1 by the number of words moved. The stores ST1 only read rI1. IN and OUT do not change it, and the jumps do not change it.

Check

python3: the codes for rI1 are 99 (LD1), 1717 (LD1N) and 4949 (INC1, DEC1, ENT1, ENN1), and MOVE has code 77.

Remarks

Compare Exercise 1.3.1-16: MOVE is used there because it changes rI1 as a side effect.

This solution is drafted, and a person has not reviewed it yet. The source.

In Lean

not stated yet The exercise is not stated in Lean yet.

The status is computed from the Lean build. The node of the map.

Something is wrong? Report it.