I need this translated in MIPS can anyone help me out?
#include <stdio.h>
int n;
int row[8], s = 0;
bool safe(int x, int y)
{
int i;
for (i = 1; i <= y; i++)
if (row[y - i] == x || row[y - i] == x - i || row[y - i] == x + i) return false;
return true;
}
void putboard()
{
printf("\nSolution #%d:\n---------------------------------\n", ++s);
int x,y;
for (y = 0; y < 8; printf("|\n---------------------------------\n"), y++)
for (x = 0; x < 8; printf(x++ == row[y] ? "| Q " : "| "));
}
int main(int y)
{
int x;
for (x = 0; x < 8; x++)
if (safe(row[y - 1] = x, y - 1))
if (y < 8) main(y + 1);
else putboard();
return 0;
}