CSCI240 HOMEWORK MIPS 2 solution




5/5 - (3 votes)

Write a MIPS assembly language program that accomplishes the following tasks:
compute Func(n): if (n = 0) return 6
else return 4*Func(n-1) + 5*n;
Have n (n>= 0) be prompted from the user
Display a result_message together with the numeric value of the result.
NOTE: use recursive function call.
You shouldn’t worry for very large values of n (the possibility of an overflow)
Name your program: yourlastname_h2.s
Upload the homework on Blackboard under MIPS_H2