Assigned 25 January, 2001
Due 1 February, 2001
INSTRUCTIONS
The goal of this assignment is to get familiar with the SPIM Simulator, by actually running a program written in the MIPS Assembly Language. Don’t worry if you’ve never seen an assembly program. An example program will be provided to you, and you will be asked to make a simple modification to it.
Install the SPIM Simulator on your personal machine or find a machine that already has it installed. (The ATN machines and the PCs in the PC Lab of Sitterson Hall (room 030) have it in the PCSpim program group.)
The instructions on installing the SPIM simulator can be found at http://www.mkp.com/cod2e and http://www.cs.wisc.edu/~larus/spim.html. If you decide to use the DOS or Windows version, there are also documentation for its interface in the above pages.
Now, save this program in a file and load it to the simulator. Run it! Do you see the output?
Use any text editor to modify the fourth line of the program, by changing the string 1234 to the last four digits of your student ID number. (Make sure they are inside the double-quote marks.) Run the modified program. Do you see a different output? Write down the output which will be part of your submitted answer.
If you’re interested in what the program is actually doing, you’re encouraged to browse Appendix A of the textbook.
HOW TO SUBMIT
Your answer will consist of two lines. In the first line, write your COMPLETE student ID number without the dash. (This will help me recording your grades in the future too!) In the second line, write down the output you saw AFTER YOU MODIFY the example program. Here is an example:
707054321 825373492
Submit your answer via EMAIL to chunfa@email.unc.edu (Please note the address change.) by the beginning of class on the due date.
Please also put HW3 in the subject line of your mail.
P.S. Many of you submitted assignment 1 or 2 as a well-formatted HTML or MS-Word document. I appreciate the thought of making it pleasant to read to me. However, it will be easier for me to grade your assignments if you simply submit them as plain text within the body of your email. Thanks.
January 25, 2001 12:55