#--------------------------------- # Lab 6: Fibonacci # # Name: # Onyen: # # -------------------------------- # Below is the expected output. # # 0 # 1 # 1 # 2 # 3 # 5 # 8 # 13 # 21 # 34 # 55 # 89 # 144 # -- program is finished running -- #--------------------------------- .data newline: .asciiz "\n" .text main: li $s0, 0 #start value for the fib sequence li $s1, 13 #end value for the fib sequence mainloop: add $a0, $s0, $0 #load the value we want to pass in to the fib method jal fib add $a0, $0, $v0 #store value to print li $v0, 1 #System call code for printing an int syscall li $v0, 4 #System call code for print_str la $a0, newline #address of string to print syscall #print the string addi $s0, $s0, 1 bne $s0, $s1, mainloop li $v0, 10 #System call code for exit syscall #exit the program fib: #------- INSERT YOUR CODE HERE ------- # #(You may delete the comment here when you insert your code) # #------------ END CODE ---------------