Turn your final .mas file in via Canvas.
- Use one of the Windows machines in DBH 288 -- the black machines on the
rows closer to the back of the room.
- Log in with your OIT user name and password so that you will be
able to save any files you work on for later use.
- Visit our textbook's official web site, select the
"SAMPLE MATERIALS" tab, and download the MARIE Simulator file.
- Double-click on 'MARIE_Simulator.zip". Most Windows machines will automatically
"unzip" (uncompress the file, compressed into the zip file format) if you double-click
on the file name.
-
In Windows, open the Windows Explorer, go to Downloads or Desktop -- wherever
your web browser placed the unzipped MARie simulator files.
- Copy the marieSim.jar file out into a folder that is not inside the Windows zip file
viewer. (Your Desktop is a good choice.) Double-click on the copy of marieSim.jar.
Write and run a complete MARIE assembly program to do this:
Read in from the user and store in X a numerical value.
Calculate X2 and store it in Y
Output Y to the user
You may assume the user will only input a positive integer or 0 for X.
Hint: Recall your elementary school multiplication tables. 3 * 3 = 9 = 3 + 3 + 3.
N.B.: MARIE's output window is, by default, set to display characters in ASCII.
Unless the value your program outputs is a displayable character ('a' instead of the space
character) you may not be able to see output from your program until you
reset the window to display in Hex or Dec.
- Upload the working and tested source code (.mas) to Canvas
by the assignment deadline. Some of the lab points are given for showing up
and diligently working on the lab where the professor can see you working.