Create the following code in assembly:
Write, run and test a MIPS program to implement the following C code segment.
if (g >= h)
g++;
else
g--;Develop an algorithm, test it and then implement it in MIPS assembly that takes an array of characters, then reverses it in memory and prints the reversed version.
Write a MIPS program to execute the following nested C loop.
for(i = 0; i < a; i++)
for(j = i; j >= 0; j--)
C[i] *= j;Translate the following C program to MIPS assembly.
int main() {
t1 = fact(8);
t2 = fact(3);
t3 = t1 + t2;
}
int fact(int n) {
int i, result = 1;
for (i = n; i > 1; i--)
result = result * i;
return result;
}Design an algorithm for testing whether a given string is a palindrome. (Recall that a palindrome is a word that is the same forward and backward. For example, the words “wow” and “racecar” are palindromes.) Implement your algorithm using MIPS assembly code.