CS 2734
Computer Organization II
int sumit(int a[])
{
int c[5];
int i;
for (i = 0; i < 5; i++) {
c[i] = a[i+1] - i;
a[i] = 2*i + c[i];
}
return 0;
}
Assume the address of a is in register i0, Allocate c on the stack.
Write a C calling program. Input the parameters from a file whose name you get from a command line argument to the program. Use a makefile. Hand in all source code and your makefile when your get the lab checked off.
Download the
data for Laboratory 5a into a file called
my.data on the same directory with your program.