Question: Please help me write a factorial in MIPS Assembly. The pseudocode looks like: factorial(i) { int num = 1; for (int i = 1; i
Please help me write a factorial in MIPS Assembly.
The pseudocode looks like:
factorial(i) {
int num = 1;
for (int i = 1; i <= n; i++) {
num *= 1
}
return num
}
This is a method that I will use inside another method. n is stored in register $s0, i is stored in register $s1. Register $s2 is already storing another variable in another method. How would I make this method in MIPS? Please explain the steps.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
