CPE 315
Winter 2008
Laboratory Project #2
Due by 3:10 pm, Tuesday Feb. 5


Lab 2 FAQ
Notes:
  1. This is an individual assignment.
  2. All submission and plagarism rules are in effect.
  3. Don't use any MIPS pseudoinstructions, except la, in this lab.
  4. You can assume there are no overflows generated by your program.


Objectives:

Reference:
Appendix A of our text has a complete manual for the MIPS ISA, XSPIM and its MIPS assembler.

Description:

  1. Write a MIPS program
    Write a program that inputs a set of integers (both positive and negative), 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.

    Constraints and Hints

    1. la
      You may use the la pseudo-instruction but no other pseudo instructions.

    2. No priming read
      Do all of the inputs with one syscall, inside a single loop. No priming read permitted.

    3. Initialize smallest
      Initialize the register that holds your smallest value to maxint.

  2. Test Cases
    If you've forgotten how to generate proper test cases, talk to me during lab time.
    Proper test cases are a major part of this lab grade.

  3. Prove the program works
    Be sure you can run the program with this command line:
    xspim   -nopseudo -file lab2.asm

    Do screen prints of (at least 3 good) test cases that prove your program works.
    If you prefer, you can demo your program during lab on Feb. 5; include your test cases in the formal lab report.

Deliverables
A formal lab submission as described in the syllabus.
Even if you plan on demoing during lab, include written test cases in your formal report.


Last updated on 1/27/08