So I am writing a program and subroutine where this is basically the pseudocode.
int findmin(int* vals, int count){
if(count == 1){
return vals[0];
}else{
int minrest = findmin(vals+1,count-1);
if (minrest < vals[0]){
return minrest
}else{
return vals[0]
}
}
}
I basically have to put this into m68k assembly code. In the pictures is what i have so far. I think my logic is correct but for some reason all this does is printout my header and nothing else, I feel like for some reason I am not corectly storing my result into D0 where it should be. Is there a step I am missing or something that I am just completely off on? My prog4.s is my main that calls the subroutine
My prog4.s is my main that calls the subroutine subroutine recursive function