CS 2734
Computer Organization II
Laboratory 2.5 [9/15; 9/17] Introduction to MIPS:
Simple program and simple array
-
Prior to the laboratory, you should do the following:
- Make a separate directory for laboratory 2.5 and put all of
the code that you develop for this lab in that directory.
- Write two MIPS programs:
- The first is a program that prints the first 20
Fibonacci numbers on a line, with a space between each one,
[Note: the Fibonacci numbers are the sequence 0, 1, 1, 2, 3,
5, 8, 13, 21, 34, 55, ..., each number the sum of the two previous ones.]
- Modify the first program into a second that allocates space for an integer
array (A) of size 20 and stores the first 20 Fibonacci numbers
into this array. Then it should print the
numbers in this array, on one line with a blank between each one.
- Be sure to thoroughly document your programs following the style
of the programs discussed in class. (Insufficient documentation will
bump an otherwise working program down to 8.)
- Implementation Notes:
- Write a C version of this program first to make sure you understand it.
- For Checkoff:
- Handle each program separately, finishing the first before the second.
Get a printout of each program using
prtext. Give the
program to the lab instructor before he starts your check-off procedure.
- Run your program for the lab instructor and let him see that
you got the correct values.
Revision Date: 9/11/98