c to mips

paradise's Avatar, Join Date: Apr 2010
Newbie Member
int i ;
void set_array(int num){
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;
}


anybody know how to convert to mips code
0
addee's Avatar, Join Date: Jun 2010
Newbie Member
I think the ctomips.com may help. They will convert your c source code into mips assembly. What you need to do is just put these code into a c file and upload it on their website, then you will get the assembly. It just works!