I am trying to pratice how recursion works in Mips. So I tried to write a fibonacci function fib.
At first I had `addi $a0, $a0, n` to write a general solution, but I thought that if I want to check my results in Qtspim , maybe i need to add a real number as an argument. I do not want a full answer , if the thought behind the code is wrong, but some help in order to run it in Qtspim, and find my mistakes (logic mistakes) on my own  

This is my code:

```
.globl main
    .text
    main:
addi $a0, $a0, 4

fib:
addi $sp, $sp, -8
sw $ra, 4($sp) 
sw $a0, 0($sp) 
slti $t0, $a0, 1
beq $t0, 1, L2  #if n<1     
beq $a0, 1, L2  # if n=1
beq $t0, 0, L1 # if n>1

#what to do when n<=1
L2:
addi $v0, $v0, 1 
jr $ra 

#what to do when n>1
L1: 
addi $a0, $a0, -1 
jal fib
lw $a0, 0($sp)
lw $ra, 4($sp)
addi $sp, $sp, 8
lw $t1, 0($v0)
add $v0, $t1, $v0
jr $ra

li $v0,10
syscall

```

I get an **error message** as such:
Bad address in data/stack read: 0x00000000