Using a text editor, lc3as,
and lc3sim-tk, write
an LC/3 assembly language program that
(1) originates at memory location x3000
;
(2) loads into R1
the value stored in x4000
;
(3) uses R1
as the base of an "array" of three elements;
(4) adds those three elements;
and (5) stores the result in x4002
.
At some point you will need to show the instructor that you have set up memory with appropriate values to test your program and that you can step through your program and set breakpoints for it.
Modify your program so that it assumes that the size of the array is 100, not 3. This time you will need a loop.
Modify your program so that it assumes that x4001
contains the size of the array.