Question: Write an LC-3 program that compares 2 numbers that are stored in memory locations x3100 and Register R1. The greater of the two numbers should

 Write an LC-3 program that compares 2 numbers that are stored

Write an LC-3 program that compares 2 numbers that are stored in memory locations x3100 and Register R1. The greater of the two numbers should then be stored into the memory location x3101. Your program should start at memory location x3000. Write the program in LC-3 binary code. Comment each line of code. (Hint: To calculate a-b, you just need to calculate a -b). In LC3, you can use NOT and ADD to get 2's complement of a number.) Write an LC-3 program that compares 2 numbers that are stored in memory locations x3100 and Register R1. The greater of the two numbers should then be stored into the memory location x3101. Your program should start at memory location x3000. Write the program in LC-3 binary code. Comment each line of code. (Hint: To calculate a-b, you just need to calculate a -b). In LC3, you can use NOT and ADD to get 2's complement of a number.)

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!