Question: Need help demonstrating code in Ubuntu command terminal for lc3 Conditional Branches in the LC-3 Due: Report due beginning of lab the next week. Be

Need help demonstrating code in Ubuntu command terminal for lc3  Need help demonstrating code in Ubuntu command terminal for lc3 Conditional

Conditional Branches in the LC-3 Due: Report due beginning of lab the next week. Be sure to email your code listings to the TA. Goal: To gain more experience programming the LC-3 computer in its native machine language, and to understand its conditional branching operations. For all of the following problems, have your program start at memory location x3000, and end with a HALT instruction. Be sure to use descriptive comments also. I. Write a binary machine language program that compares the contents of R2 and R3, and puts the larger of the two into RI. If R2 and R3 are equal, put xFFFF in R1. Hint: Think about how a subtract operation might assist in comparing two values. Demonstrate it to your TA with the following values R2 R3 R 0 7 xFFOF xFOFF xFFOF #191:FFFF #19 2. Write a binary machine language program that multiplies the value stored in R2 by the value stored in R3 with the final result stored in R1. You can assume that the two operand values will not cause an overflow, but they can be either positive or negative. Remember 3 4 = 04= 3x-4=-(3 4) -3 0=0 Demonstrate it to your TA with the following values in this order. R2 R3RI 3 4 x000C (12) -3 4 xFFF4 (-12) 3 0 x0000 (0) 3 4 xFFF4 (-12) 3 4 x000C (12) 0 4 x0000 (0)

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!