Four bytes, for the single variable a
.
main()
Here
is the code for main()
, with some blanks.
The rules for the subroutine prolog are copied from above.
Recall that
sw $ra,($sp)
is shorthand for
sw $ra,0($sp)
The instruction stores the contents of $ra
at the address in the stack pointer.
(The contents are stored on the top of the stack.)
Fill in the blanks as the comments suggest.