Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .data
- .text
- .globl main
- main:
- #$a0$a1$a2...
- jal funcion ----> salta , $ra direccion retorno
- #$v0,$v1
- .
- .
- .
- syscall
- funcion:
- apilar $ra
- jal funcion----> se llama a si misma
- despilar $ra
- jr $ra
- funcion2:
- .
- .
- .
- jr $ra
- RECURSIVAS
- n!= n+(n-1)!
- Caso Trival----> ifactorial(n)=n+factorial(n-1)
- 4 llamadas
- $v0-->5
- li $v0, 1-print
- 4-print
- 5
- 8
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement