CPE 315
fall 2004
Laboratory #4
Due at the beginning of lecture, 10/11/02
Notes:
- This is an individual assignment.
- All submission and plagarism rules are in effect.
- Don't use any MIPS pseudoinstructions in this lab.
- You can assume there are no overflows generated by your program.
Objectives:
- To learn how to write MIPS assembly code.
- To understand the lui/ori sequence for loading addresses.
Files:
MIPS Demonstration Program
Run this yourself to confirm that you understand.
SPIM Simulator
Note there are versions for Windows and Linux. The Windows version
requires no configuration work; you download an executable.
Reference:
Appendix A of our text has a complete manual for the MIPS ISA, XSPIM and its
MIPS assembler.
Description:
- Write a MIPS program
Write a program that reads in a set of integers, terminated by a 0.
The program determines the smallest integer, the total number of integers and
the number of even/odd integers.
The results must be displayed on the XSPIM console window.
- Prove the program works
Be sure you can run the program with this command line:
xspim   -nopseudo -file lab4.asm
Do screen prints of (at least 3 good) test cases that prove your
program works.
Deliverables
A formal lab submission as described in the syllabus.
Last updated on 10/04/04