I cant figure out how to translate this code into MIPS. Any help or tips would be helpful.
int findMax (int numbers [ ], int count)
{
int currentMax = -1;
if (count > 0)
{
currentMax= 0;
int i = 1;
while (i < count)
{
if (numbers > numbers [currentMax])
currentMax = i;
i = i + 1;
}
}
return currentMax;
}
use $s1 for "currentMax" and $s2 for "i"