Figure 6.5
1. Initial valuesR = 20 memory location 80 = 43 | |||
| Operation | Final Contents of Register R | Final Contents of Mem Loc 80 | Final Contents of Mem Loc 81 |
|---|---|---|---|
| a. LOAD 80 | 43 | 43 | 97 |
| b. STORE 81 | 20 | 43 | 20 |
| c. COMPARE 80 | 20 | 43 | 97 |
| (and the GT indicator goes ON) | |||
| d. ADD 81 | 117 | 43 | 97 |
| e. IN 80 | 20 | Whatever value is entered by the user | 97 |
| a. OUT 81 | 20 | 43 | 97 |
2. Initial values memory location 50 = 4 | |
| Operation | Final Contents of Register R |
|---|---|
| a. LOAD 50 | 4 |
| b. LOAD 4 | A copy of the contents of memory cell 4. |
| c. LOAD L | Because L is the equivalent to 50, this operation is equivalent to LOAD 50, which is the same as part (a). |
| d. LOAD L + 1 | A copy of the contents of memory cell 51. This operation means LOAD (L + 1), which is equivalents to LOAD 51. LOAD L + 1 does arithmetic on addresses, not contents. |