So i have declared a [100][2] empty array in the data section, and towards the end of my program i use this array in an if statement. I was wondering how i go about translating this from C to mips assembly This is the if statement in C
if ((x == arr[i][0] && y == arr[i][1]) || (arr[i][0] == x && arr[i][1] == y - 1) || (arr[i][0] == x && arr[i][1] == y + 1) || (arr[i][0] == x - 1 && arr[i][1] == y) || (arr[i][0] == x + 1 && arr[i][1] == y))
gameOver++;
I understand this is going to take quite a bit of space in the text section in assembly. Would there be an alternative route to take to implement this in mips? I am unsure where to even start with these lines of C. Any help would be appreciated, thanks!
My concern is writing the portion arr[i][0]