TAOCP 1.3.1 Exercise 11
The exercise asks for all MIX operators that can affect the setting of the index register $rI1$.
Section 1.3.1: Description of MIX
Exercise 11. [15] List all the MIX operators that can possibly affect the setting of rI1.
Verified: yes
Solve time: 3m05s
Solution
The exercise asks for all MIX operators that can affect the setting of the index register $rI1$. To answer such a question, one must inspect the complete list of operators in §1.3.1 and determine which of them can alter the contents of $rI1$.
The operators fall naturally into classes.
1. Loading operators
Among the loading operators, only
$$ \mathrm{LD1}(F), \qquad \mathrm{LD1N}(F) $$
have $rI1$ as their destination register. By definition, these operators replace the contents of $rI1$ by a value derived from $\mathrm{CONTENTS}(M)$. Hence they affect the setting of $rI1$.
The operators $\mathrm{LDA}, \mathrm{LDX}, \mathrm{LD2},\ldots,\mathrm{LD6}$ and their negative variants affect other registers and therefore cannot change $rI1$.
2. Address-transfer operators for index register 1
The address-transfer operators associated with index register $1$ are
$$ \mathrm{INC1},\qquad \mathrm{DEC1},\qquad \mathrm{ENT1},\qquad \mathrm{ENN1}. $$
Their definitions are:
$$ \begin{aligned} \mathrm{INC1}&:\ rI1 \leftarrow rI1 + M,\ \mathrm{DEC1}&:\ rI1 \leftarrow rI1 - M,\ \mathrm{ENT1}&:\ rI1 \leftarrow M,\ \mathrm{ENN1}&:\ rI1 \leftarrow -M. \end{aligned} $$
Each therefore changes the contents of $rI1$.
The corresponding operators for registers $rI2,\ldots,rI6$, $rA$, and $rX$ do not affect $rI1$.
3. Comparison operators
The operator
$$ \mathrm{CMP1} $$
compares $rI1$ with a memory field and sets the comparison indicator. Its definition does not alter $rI1$. Hence $\mathrm{CMP1}$ does not affect the setting of $rI1$.
The same is true of all other comparison operators.
4. Jump operators
The jump operators, including the family associated with index register $1$,
$$ \mathrm{J1N},\ \mathrm{J1Z},\ \mathrm{J1P},\ \mathrm{J1NN},\ \mathrm{J1NZ},\ \mathrm{J1NP}, $$
test the value of $rI1$ and may change the location counter. By their definitions, they do not modify $rI1$ itself.
Likewise, the ordinary jump operators affect only the flow of control and do not change $rI1$.
5. Remaining operator classes
The arithmetic operators, shifting operators, move operator, storage operators, conversion operators, and input-output operators act on memory, $rA$, $rX$, the overflow toggle, the comparison indicator, or the location counter. None of their definitions includes an assignment to $rI1$.
Therefore none of these operators can affect the setting of $rI1$.
Conclusion
The only MIX operators whose execution can change the contents of $rI1$ are
$$ \boxed{\mathrm{LD1},\ \mathrm{LD1N},\ \mathrm{INC1},\ \mathrm{DEC1},\ \mathrm{ENT1},\ \mathrm{ENN1}.} $$
These are precisely the operators in the MIX instruction set whose destination is $rI1$. ∎