Answered step by step
Verified Expert Solution
Link Copied!

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 6.22 in the textbook. The use of the LC-3 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 n-digit combination. The electronic lock has ten buttons labeled 0 to 9 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 x3150. After n buttons have been pressed, the null character x00 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 x3100. If the lock should open, the program stores a 1 in location x3050. If the lock should not open, the program stores a 0 in location x3050. Note that some of the instructions are missing
0011000000000000
0101101101100000
0010000000001111
0010001000001101
0110010000000000
0110010000000000
1001011011111111
0001011011100001
0000101000000100
0000111111110110
0011101001000001
1111000000100101
0011000100000000
0011000101010000
1111000000100101
Question 1(4 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 word/text file or a clear photo of a handwritten answer. Question 2(1 point) Execute your program using LC-3 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 D2L

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Rearrange 10n=5(k-3) to make k the subject. Watch video

Answered: 1 week ago