Due 4/3 by 5pm (old deadline)
With thanks to Jeff Shafer at the University of the Pacific for inspiration.
Log in with your CS lab user name and password so that you will be able to save any files you work on for later use. (On Windows, you will need to save your files to the T: drive to be able to use them later.)
"java -jar /Applications/MarieSim/marieSim.jar" is the command to run MARIE from the command line in the Mac OS; double-clicking on MarieSim.jar in a Mac Finder window will also start it. In Windows, open the Windows Explorer, go to "Computer", then the "Bootcamp" drive, then "Program Files", then "MarieSim" and double-click on marieSim.jar.
MARIE assembly language programs are saved in ".mas" files (which are plain text). Use "File -> Edit" to open assembly language editor in MARIE simulator.
Download Ex4_1.mas, or copy it out of the /Applications/MarieSim folder to your Desktop or other personal folder, and use "File -> Open" (from the editor window) to open it in the MARIE editor.
MARIE command line:
Label, opcode operands / comments
Instructions for assembler:
In editor window, use "Assemble -> Assemble Current File". This will produce several files, one of which is the ".mex" file that contains machine code the simulator can use.
In editor window, use "Assemble -> Show assembly listing". What do you see? What are the references for the symbol "One"?
In simulator window, use "File -> Load" and select .mex file from previous step.
Run the program, identify what all the sub-windows do, particularly the window on the bottom.
Use "Run -> Set stepping mode -> On" and restart ("Run -> Restart") the program simulation, this time using the "Step" button to watch changes one step at a time.
With a partner or on your own, write and run a complete MARIE assembly program
to do this:
if Y > X then Y = Y - 5; else X = X + Y;