Program Assignment 1
Due: Midnight (11:55 PM), Thursday 25 March 2004
Objective: Write a program MIPS that will find the smallest number in a list of signed
integers.
Description:
The program has the number of integers (as words) stored at location NUM.
The list starts a location LIST. You should save the result at location
MIN and also print out the number on the console.
Your assembly language program should be named as min.s. It should have
adequate comments in it.
Submit your min.s file using the WebCT
Notes:
- You are expected to adequately comment the code to make it readable. Identify the function of each register used.
- If your code does not assemble on the SPIM simulator available in the CS department machines, you do not get any points.
- When a program, written using a Windows based editor, is viewed using a Unix editor like vi or emacs, you will notice the control character for carriage return at the end of every line. It is quite possible that such files will not work very well with the Unix version of SPIM in our CS departmental machines. If you are using a Windows based editor, please remember to convert your code using the dos2unix utility. To convert your files, type /usr/bin/dos2unix .
- You are advised to successfully run your code on the CS departmental machines before submitting it.
- Make sure that you have named the programming assignment as specified above.
Hints: Refer to Appendix A of your text and class notes for help on system call, addressing modes etc.