I am looking for some help with the fibonacci in Mips. Yes, I am a student (part time). Yes, I have made an attempt which is below. Yes, I have tried looking for help, hence me finding this forum.

I have the values for the previous value, $t3, and the value for the second to last value found, $t4. I am adding these into %t5. My question is how can I store the value in %t5 in to my array which is stored in %s0? Please excuse the inefficiency as I am a newbie to assembly.

somers

.data

fibarray: .word 0,1,0,0,0,0,0,0,0,0

.text

main:

ori $s0, $zero, fibarray

ori $t0, $zero, 2

ori $t1, $zero, 10

ori $t2, $zero, 1

daddi $s0, $s0, 16

loop:

sd $t0, 0($s0)

daddi $t3, $s0, -4

daddi $t4, $s0, -8

dadd $t5, $t4, $t3

daddi $s0, $t5, 0

daddi $s0, $s0, 8

daddi $t0, $t0, 1 # increases counter

bne $t0, $t1, loop

exit:

halt