How do I write a recursive MIPS assembly program using SPIM simulator (such as Q
ID: 3890329 • Letter: H
Question
How do I write a recursive MIPS assembly program using SPIM simulator (such as QtSpim), where for a given number (n) as an input (taken from the console), the program will recursively compute and return the corresponding factorial number. For retuning the result, use the standard console (screen) and print the output. The program must be able to take positive as well as negative integer numbers as input and must be able to respond appropriately.
For example, factorial of 6, that is 6! = 720, which is computer as: 6 x 5 x 4 x 3 x 2 x 1.
Explanation / Answer
I think below code can help you.
Let me know for any query before doing down vote.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.