Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

LC3 Please help with part A and B (6 points) Consider the following code. Assuming all registers start at zero, what is the output of

LC3
Please help with part A and B image text in transcribed
(6 points) Consider the following code. Assuming all registers start at zero, what is the output of the program? Be exact! This question is tricky in several places. Take your time. Clearly keep track of what values are in RO and R2 as the program executes (not all boxes are needed). a. "ORIG x3000 RO: 000N LEA LD OUT LEA PUTS STI TRAP HALT RO, THING RO, LABEL -Prins R2, BLAH Fill x21 LABEL .FILL x48 THING .STRINGZ "ar" A BLAH .FILL x21 .END Program Output: b. (4 points) The following program is supposed to print the number 5 on the screen, but does not work. Explain, in 10 words or less, why it does not work as intended. Insert the code needed to make the program work as intended. DO NOT change any of the instructions. 2. . ORIG x3000 JSR A OUT BRnzp DONE AND RO, RO, #0 ADD RO,RO, #5 - RET DONE HALT ASCII .FILL x0030 R1, ASCII RO, RO, RI LD ADD RET . END

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Business Process Driven Database Design With Oracle PL SQL

Authors: Rajeev Kaula

1st Edition

1795532386, 978-1795532389

More Books

Students also viewed these Databases questions

Question

Choose an appropriate organizational pattern for your speech

Answered: 1 week ago

Question

Writing a Strong Conclusion

Answered: 1 week ago