Problem When Proc call Procs
jal procAddress
- causes $31 to contain the next address
So each time that a procedure is called (eg, when ‘prod’ is called inside ‘sprod’)
- $31 gets overwritten (‘clobbered’)
- so that the return address for the outer procedure is no longer available!
Stacks can get us out of this problem.