I need to write a MIPS assembly language code for merge sort. I have already created the merge function but the merge_sort function that uses recursion extensively confuses me. I have posted the reference C code for the same. I understand that stacks will have to be used, however, unable to do it myself being a beginner, I would appreciate any kind of help.
int merge_sort(int arr[],int low,int high)
{
int mid;
if(low<high) {
mid=(low+high)/2;
// Divide and Conquer
merge_sort(arr,low,mid);
merge_sort(arr,mid+1,high);
// Combine
merge(arr,low,mid,high);
}
return 0;
}