Write a MIPS code for the following C program to run perfectly in Qtspim???

Void main () {
Int array[10];
For (i=0; i<10; i++)
{ array[i]=compare(num, i);}
}
Int compare (int a, int b) {
If (sub(a, b,) >=0 )
return 1;
else
return 0;
}
Int sub ( int a, int b) {
return a-b;
}

That example will not even compile. Furthermore, you should show what you have tried so far before blatanly requesting answers to problems you have.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.