Exercise · Volume 1 · 1.3.1-4
Exercise 1.3.1-4
not stated yet in Lean solution written
| Rating | 00 |
|---|---|
| Kind | Informal: the exercise has no formal statement, so Lean does not state it from the written solution |
| Section | Section 1.3.1 of Volume 1. Companion chapter: Description of MIX |
The task
Explain why the instruction LDA -2000,4 is legal although memory addresses are not negative.
The exact wording is in your copy of the book.
Solution
Show the solution
The rule that an address lies between and applies to , the address after indexing. For LDA -2000,4 the machine adds the content of index register 4 to the number . If rI4 holds a value of or more, then is at least . If rI4 is at most , then is at most . So the instruction is legal for each rI4 from to , and it is undefined for other contents.
Remarks
Such an instruction is useful in a loop that counts an index register up from a negative value, as in the programs of Section 1.3.2.
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.