Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This lab is based on Exercise 6 . 2 2 in the textbook. The use of the LC - 3 simulator has been explained in
This lab is based on Exercise in the textbook. The use of the LC simulator has been explained in the class. However, if you need a reminder about it you can refer to the document attached to this lab. You can ignore anything related to assembly language at this point. We are only working on machine language in this lab. A warehouse is controlled by an electronic lock having an ndigit combination. The electronic lock has ten buttons labeled to on its face. To open the lock, a user presses a sequence of n buttons. The corresponding ASCII characters get loaded into sequential locations of memory, starting at location x After n buttons have been pressed, the null character x is loaded into the next sequential memory location. The following program determines whether or not the lock should open, depending on whether the combination entered agrees with the combination stored in the n memory locations starting at x If the lock should open, the program stores a in location x If the lock should not open, the program stores a in location x Note that some of the instructions are missing Question points Complete the program by filling in the missing instructions. Detail your reasoning for the chosen instructions hint: consider drawing a flowchart for the program Submissions can be in the form of a wordtext file or a clear photo of a handwritten answer. Question point Execute your program using LC tools. Capture and submit screenshots of your program showing the machine code and two separate executions: one demonstrating the lock open and another with the lock remaining closed. Upload these screenshots to DL
This lab is based on Exercise in the textbook. The use of the LC simulator has been explained in the class. However, if you need a reminder about it you can refer to the document attached to this lab. You can ignore anything related to assembly language at this point. We are only working on machine language in this lab. A warehouse is controlled by an electronic lock having an ndigit combination. The electronic lock has ten buttons labeled to on its face. To open the lock, a user presses a sequence of n buttons. The corresponding ASCII characters get loaded into sequential locations of memory, starting at location x After n buttons have been pressed, the null character x is loaded into the next sequential memory location. The following program determines whether or not the lock should open, depending on whether the combination entered agrees with the combination stored in the n memory locations starting at x If the lock should open, the program stores a in location x If the lock should not open, the program stores a in location x Note that some of the instructions are missing
Question points Complete the program by filling in the missing instructions. Detail your reasoning for the chosen instructions hint: consider drawing a flowchart for the program Submissions can be in the form of a wordtext file or a clear photo of a handwritten answer. Question point Execute your program using LC tools. Capture and submit screenshots of your program showing the machine code and two separate executions: one demonstrating the lock open and another with the lock remaining closed. Upload these screenshots to DL
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started