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 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
Get step-by-step solutions from verified subject matter experts
