Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Insert your code
- # Fibonacci
- # a0β>n
- # s0 β> fib(nβ1)
- # v0 β> result
- #
- # Some Parameters
- #
- .data
- endl: .asciiz "\n"
- #
- # main
- #
- .text
- .globl main
- main:
- addi $sp, $sp, -4 # save return adress
- sw $ra, 0($sp)
- #fib(4)
- li $a0, 4
- jal fib
- # Wert ausgeben
- move $s1, $v0
- move $a0, $s1
- li $v0, 1
- syscall
- #Ruecksprungadresse wiederherstellen
- lw $ra, 0($sp)
- addi $sp, $sp, 4
- jr $ra
- #
- # end main
- #
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement