.text main: li $v0, 4 la $a0, msg1 syscall li $t0, 22 move $a0, $t0 move $t0, $ra jal f move $ra, $t0 li $v0, 4 la $a0, msg3 syscall li $v0, 0 jr $ra f: move $t1, $a0 li $v0, 4 la $a0, msg2 syscall li $v0, 1 move $a0, $t1 syscall li $v0, 11 la $a0, '\n' syscall jr $ra .data msg1: .asciiz "calling function f\n" msg2: .asciiz "in function f\n" msg3: .asciiz "back from function f\n"