Advertisement
math230

leaf1.asm - simple procedure, no stack

Oct 21st, 2015
526
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .data
  2.  
  3. .text
  4.  
  5. .globl main
  6. main:
  7.  
  8.     li $a0, 9
  9.     li $a1, 4
  10.     li $a2, 1
  11.     li $a3, 2
  12.  
  13.  
  14.     jal leaf1
  15.     nop
  16.     j exit
  17.  
  18. leaf1:
  19.     add $t0, $a0, $a1
  20.     add $t1, $a2, $a3
  21.     sub $v0, $t0, $t1
  22.     jr  $ra
  23.  
  24.  
  25. exit:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement