Question: Question 5 Consider the following LC - 3 code, which is used to provide data to the program below: . ORIG x 4 0 0

Question 5
Consider the following LC-3 code, which is used to provide data to the program below:
.ORIG x4000
DATA .STRINGZ ??%2Jw6
First, cut the data code above and paste it into the LC3 Tutor Assemble editor, and then, assemble and load the code into the
simulator.
Next, consider the following LC-3 program:
Cut the program above and paste it into the LC3 Tutor Assemble editor, but first make sure to clear all of the data code that is
still in the editor. Next, assemble and load the program into the simulator.
Use the simulator to repeatedly run the program until you understand it, and then answer the following questions:
A.Consider the following LC-3 code, which is used to provide data to the program below: DATA .ORIG X4000 STRINGZ "ah$34>G&dkf". END First, cut the data code above and paste it into the LC3 Tutor assembler editor, and then, assemble and load the code into the simulator. Next, consider the following LC-3 program: ; R5 result LOOP ; R2 ptr to data ; R3 current character .ORIG AND ADD LD LDR BRZ AND BRZ ADD ADD BRnzp HALT .FILL . END x3000 R5, R5, #0 R1, R5, #1 R2, PTR R3, R2, #0 DONE R4, R3, R1 NEXT R5, R5, R3 R2, R2, #2 LOOP CHK NEXT DONE PTR x4000 Cut the program above and paste it into the LC3 Tutor assembler editor, but first make sure to clear all of the data code that is still in the editor. Next, assemble and load the program into the simulator. Use the simulator to repeatedly run the program until you understand it, and then answer the following questions: A.) What is the result value of running the program with the data above? (Select] B.) How many times does the instruction labeled CHK execute with the data above? [Select ] C.) Which best describes the result that is produced by the program? [Select ] Notes: A null (i.e., zero) marks the string's end and is not considered a character in the string. An odd character is one whose value in base 10 is odd, otherwise it is an even character. An odd address is one whose value in base 10 is odd, otherwise it is even address.
Question 5 Consider the following LC - 3 code,

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 Programming Questions!