# Compute first twelve Fibonacci numbers and put in array, then print
.data
list: .word 3, 0, 1, 2, 65, -2, 45558758, 9, 3, 7
size: .word 10
space:.ascii  " "          # space to insert between numbers
head: .ascii  "Maksimum deger "

.text
main:
      la   t0, list       # load address of array
      lw   t1, size       # load array size
      li   t2, -10000000  # max reg

loop: lw   t3, 0(t0)      # Get value from array F[n] 
      blt  t3, t2, skip   # 
      mv   t2, t3         # new amx
skip: addi t0, t0, 4      # increment address of the source list
      addi t1, t1, -1     # decrement loop counter
      bgtz t1, loop       # repeat if not finished yet.
		
#########  routine to print the numbers on one line.
print:
      li   a0, 1
      la   a1, head       # load address of print heading
      li   a2, 15         # string boyutu
      li   a7, 64         # specify Print String service
      ecall               # print heading
      
      mv   a0, t2         # load max number for syscall
      li   a7, 1          # specify Print Integer service
      ecall               # print max number
