Question: The following section will be asking questions about the code in the following table. The Instruction Set is defined in the table on the last
The following section will be asking questions about the code in the following table. The Instruction Set is defined in the table on the last page of this assignment. The Address column represents the Memory Address. The Contents column represents the contents of the memory at the corresponding address. The Mnemonic column provides the human-readable format of the program.
| Address | Contents | Mnemonic |
| 00 | 901 | INP |
| 01 | STA 16 | |
| 02 | 901 | INP |
| 03 | 215 | SUB 15 |
| 04 | 317 | STA 17 |
| 05 | 518 | |
| 06 | 116 | ADD 16 |
| 07 | 318 | STA 18 |
| 08 | LDA 17 | |
| 09 | 215 | SUB 15 |
| 10 | 317 | STA 17 |
| 11 | 804 | BRP 04 |
| 12 | 518 | LDA 18 |
| 13 | 902 | |
| 14 | 000 | HLT |
| 15 | 001 | DAT 01 |
| 16 | 000 | DAT 00 |
| 17 | 000 | DAT 00 |
| 18 | 000 | DAT 00 |
- Fill in the missing entry in the empty square at address 01
- Fill in the missing entry in the empty square at address 05.
- Fill in the missing entry in the empty square at address 08.
- Fill in the missing entry in the empty square at address 13.
- What four addresses in the program above being used like variables or constants by storing data?
- Describe the steps this program performs.
- What instruction is missing from the LMC instruction set that, if added, would make calculating this answer easier for the programmer and faster for the computer?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
