Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # leaf1.asm
- # Simple Leaf function using jal and jr
- .data
- .text
- nop
- nop
- nop
- li $a0, 9
- li $a1, 4
- li $a2, 1
- li $a3, 2
- jal leaf1
- nop
- j exit # do NOT drop down to leaf1. Jump over it
- leaf1:
- add $t0, $a0, $a1
- add $t1, $a2, $a3
- sub $v0, $t0, $t1
- jr $ra
- exit:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement