Question: Question 1 . Suppose the following LC - 3 program is loaded into memory starting at location x 3 0 FF: X 3 0 FF

Question 1.
Suppose the following LC-3 program is loaded into memory starting at location x30FF:
X30FF 1110001000000001 R[1]<- x3100+1
X31000110010001000010 R[2]<- MEM[X3101+2]= x1482
X31011111000000100101 HALT
X31020001010001000001
X31030001010010000010
If the program is executed, what is the value in R2 at the end of execution?
Question 2.
What does this program do? What is the RESULT value after running this code?
Question 3. Consider the following assembly language program. Draw and Fill Symbol Table of the following code.
.ORIG x3000
AND R2, R2, #0
LD R0, M0
LD R1, M1
LOOP BRz DONE
ADD R2, R2, R0
ADD R1, R1, #-1
BR LOOP
DONE ST R2, RES
HALT
RES .FILL x0000
M0.FILL x0004
M1.FILL x0023
.END
Question 4. To convert temperatures written in Fahrenheit to Celsius (Centigrade), you subtract 32, multiply by 5 and then divide by 9. To convert Celsius to Absolute Value (Kelvin), you add 273.15. Write a program that displays a temperature conversion chart on the screen as follows:
Fahrenheit Celsius Absolute Value
0-17.78255.37
20-6.67266.48
404.44277.59
...............
...............
300148.89422.04
Question 5. In the table below is an LC-3 program that is loaded into five memory locations starting at x3000. First, complete the table by decoding the instructions into the rightmost column of the table.
Question 6. Write LC3 code to set R5 from R3, according to the following formula:
R5=2*R3+2

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