ps6pr6.txt - ps6pr6(Problem Set 6 Problem 6 The Fibonacci...

This preview shows page 1 out of 1 page.

# # ps6pr6.txt (Problem Set 6, Problem 6) # # The Fibonacci sequence in assembly # 00 read r4 # get # from user and store it in r4 01 setn r1 1 # set r1 to 1 02 setn r2 1 # set r2 to 1 03 write r1 # print the value of r1 04 addn r4 -1 # add -1 to the value of r4 05 write r2 # print r2 06 addn r4 -1 # add -1 to the value of r4 07 jeqzn r4 17 # if r4 is equal to zero jump to line 17 08 add r5 r1 r2

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture