Question: Write MIPS code to realize the following function given in high level pseudo-code. Make sure that: Appropriate registers are used to pass arguments to the
Write MIPS code to realize the following function given in high level pseudo-code. Make sure that:
Appropriate registers are used to pass arguments to the function.
Remember also to preserve the values of the registers as determined by the function call convention we discussed in class.
Note that a char type in C is stored in a single byte.
function strcmp(char array a[], char array b[]){ i = 0; while (a[i]!=\0 and b[i]!=\0 and a[i]==b[i]){ i = i+1; } if (a[i]==b[i]){ return 1; } else{ return 0; } } Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
