Question: please write it as assembly language For the factorial example, assume factorial is called with input argument n=5. a) What value is in $v0 when
For the factorial example, assume factorial is called with input argument n=5. a) What value is in $v0 when factorial returns to the calling function? b) Suppose you delete the instructions at addresses 0x98 and 0xBC that save and restore $ra. Will the program I. Enter an infinite loop but not crash; II. Crash (cause the stack to grow beyond the dynamic data segment or the PC to jump to a location outside the program); III. Produce an incorrect value in $v0 when the program returns to loop (if so, what value?); IV. Run correctly despite the deleted lines
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
