$29
Objective
The purpose of this assignment is to familiarize you with the basics of LC3 assembly language programming, the SIMPL emulator, and rudimentary debugging.
Your Tasks
Implement the LC3 program from the image below.
Note:This is basically the same program you worked with Lab 02 that used a DO-WHILE loop to multiply two numbers together.
First (as with all your labs and assignments) open Piazza to the GitHub Classroom Lab and Assignment Linkspost, and click on the assn 1 link to create your GitHub repo, then clone it to your VM.
Copy the code from the image into the assn1.asm file, and then launch & run simpl in a terminal:
simpl assn1.asm
Remember:whenever you run simpl, you must ALWAYSkeep the Text Window open so you can see warnings & error messages from the emulator!
When the emulator opens, place a breakpointat the beginningof the DO-WHILE loop by right-mouse-clicking that line of code and selecting “Mark as Breakpoint”.
Lastly, create a table to record the register contents for eachregister (R0 through R7)
Before entering the loop (i.e. the first time the program halts)
After each iteration of the loop (each subsequent halt)
Note that since your breakpoint is at the start of the loop, the values for the end of the final iteration will just be the values when the program has ended, as suggested by the naming of the last row in the image below.
How many rows do you think you will end up with in your table?
Record the table as a block of comments beneath your header and above the actual LC3 code, just like the table in the image below (but obviously with values read from your registers!)
The following program performs the action:
R3 <-- 6 * 12
(i.e. multiply 6 by 12 and write the result into Register 3)
using a DO-WHILE loop:
Submission Instructions
Submit to GitHub as we taught you in lab: git pull; git add; git commit; git push See the GitHub guideagain if needed.
Rubric
There is nothing for you to actually get wrong in this assignment (we give you the code!) - so the only way to mess up and lose points would be to fail to follow our instructions.
So get into the habit of reading the instructions carefully :)
This assignment has to be graded manually (i.e. we have to look at your code formatting and your register table), so your results file will be pushed to your repo only once, after the deadline. See the point above!
For this and all assignments, use of the template given to you in the GitHub repo is required.
Comics??!Sweet!!!
Source: https://xkcd.com/