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
Consider the following LC code, which is used to provide data to the program below:
ORIG
DATA STRINGZ
First, cut the data code above and paste into the Tutor Assemble editor, and then, assemble and load the code into the
simulator.
Next, consider the following program:
Cut the program above and paste into the Tutor Assemble editor, but first make sure clear all the data code that
still the editor. Next, assemble and load the program into the simulator.
Use the simulator repeatedly run the program until you understand and then answer the following questions:
Consider the following LC code, which is used to provide data to the program below: DATA ORIG X STRINGZ ah$G&dkf END First, cut the data code above and paste it into the LC Tutor assembler editor, and then, assemble and load the code into the simulator. Next, consider the following LC program: ; R result LOOP ; R ptr to data ; R current character ORIG AND ADD LD LDR BRZ AND BRZ ADD ADD BRnzp HALT FILL END x R R # R R # R PTR R R # DONE R R R NEXT R R R R R # LOOP CHK NEXT DONE PTR x Cut the program above and paste it into the LC 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 ie zero marks the string's end and is not considered a character in the string. An odd character is one whose value in base is odd, otherwise it is an even character. An odd address is one whose value in base is odd, otherwise it is even address.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
