Question: Hello sir, This is a simple question about an lmc simulator, can you solve it ? Computer architecture [ Year 3 ] Online / Remote

Hello sir, This is a simple question about an lmc simulator, can you solve it?
Computer architecture [Year 3]
Online/ Remote practice questions
November 2022
This is original program loader
86 LDA 98598// initialize the STORE instruction at loc. 92
87 STO 92392// storing the contents of mailbox 98, that is 301
88 INP 901// input a value
89 SUB 97297// subtract 999
90 BRZ 01701// done loading--jump to 01 for execution
91 ADD 97197// restore input value
92 DAT 00// store value. This will contain 3XX, with XX indexed
93 LDA 92592// load the STORE instruction in 92
94 ADD 99199// increment it
95 STO 92392// and resave it
96 BRA 88688// continue with the next input
97 DAT 999999// value 999 for testing
98 DAT 301301// initial STORE 01 instruction as a data value
99 DAT 011// value 1 for indexing
What you need to do
1. Load the above program loader in the LMC. The instructions should be loaded in your LMC at the mailboxes indicated above to work properly. Please make sure that in mailbox 00 you have the instruction to branch to mailbox 86(first instruction of the program loader).
2. Run the program loader and input the following user program which asks for 3 nums, add the first 2 nums , and subtract 1st num from 3rd, which means 3rd num minus 1st num. Also
Please convert to opcodes to enter instruction in lmc simulator, use peterhigginson lmc simulator
00 INP
01 STA 09
02 INP
03 ADD 09
04 OUT
05 INP
06 SUB 09
07 OUT
08 HLT
09 DAT 00
Please answer :
How do you do it, how did you add a branch to mailbox 86 in mailbox 00. Step by step process in lmc simulator required.
Second part:
This original program loader loads the user program starting at mailbox 01, you need to change this to load the user program starting at mailbox 30.
So, you have to make the code for the modified program loader that starts at mailbox 00 and load the user program starting at mailbox 30 and explain the changes.
Summary of final requirements -
How to run original code above with a user program to perform calculations. Please make sure that in mailbox 00 you have the instruction to branch to mailbox 86(first instruction of the program loader). Whole code needed.
Modified original code with steps to run it with a user program in the simulator. Move the program loader so that it starts at mailbox 00 in the LMC. Modify as required so it works properly. The original program loader loads the user program starting at mailbox 01, you need to change this to load the user program starting at mailbox 30.
Please provide - Full original code with user program and Full modified code with user program with steps to run it in simulator required in homework.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!