Question: Mailbox Mnemonic Opcode Comment 86 LDA 98 598 // initialize the STORE instruction at loc. 92 87 STO 92 392 // storing the contents of
Mailbox Mnemonic Opcode Comment 86 LDA 98 598 // initialize the STORE instruction at loc. 92 87 STO 92 392 // storing the contents of mailbox 98, that is 301 88 INP 901 // input a value 89 SUB 97 297 // subtract 999 90 BRZ 01 701 // done loading-jump to 01 for execution 91 ADD 97 197 // restore input value 92 DAT 00 // store value. This will contain 3XX, with XX indexed 93 LDA 92 592 // load the STORE instruction in 92 94 ADD 99 199 // increment it 95 STO 92 392 // and resave it 96 BRA 88 688 // continue with the next input 97 DAT 999 999 // value 999 for testing 98 DAT 301 301 // initial STORE 01 instruction as a data value 99 DAT 01 1 // value 1 for indexing What you need to do Understand what the program is doing. The instructions should be loaded in your LMC in the mailboxes indicated above to work properly. However, unless you fill the first 86 mailboxes with DAT statements, which is very cumbersome, you would have go through some good challenges to do that. A simpler way is to just modify the program so that it can be loaded starting at mailbox 00 in the LMC
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
