Lab 2 Week 8: Wednesday Oct.21
In this lab assignment you will get started on the LC3 simulator to write a very simple LC3 program. You must write the code in assembly or binary: this is what you will hand in (or demo to the TA in the lab).
Write the LC-3 code to determine the maximum of two values, stored initially at memory locations x3100 and x3101. The two input values are loaded into R0 and R1, and the code should place the greater of these two numbers into register R5. Hint: you may find calculating R0-R1 useful.
Assume your program starts at memory address x3000
Assume that the initial values for R0, R1 are to be loaded from memory addresses x3100 and x3101 respectively.
Run your program on the LC3 simulator for the following two sets of inputs:
(a) The value stored at x3100 is x0010 and value stored at x3101 is x000A
(b) The value stored at x3100 is x0110 and value stored at x3101 is x0201