1 PRINT "Fibonacci Sequence Generator" 2 PRINT "by Mike Rousos" 3 FILL 1 4 POKE 1 5 POKE 2 // Initializing all the things that start at 1. 6 POKE 3 7 POKE 5 8 PRINT "How many fibonacci numbers (from 1 to 23) would you like to see?" 9 GET 10 POKE 6 // Determines how long to count for 11 FILL 24 12 POKE 7 13 GTE 6 7 // Too big? 14 GOTO 39 15 GTE 6 5 // Too little? 16 GOTO 20 17 PRINT "Your number is too small! Please try again." 18 FILL 1 19 GOTO 8 20 PRINT "1" //Display the first 1. 21 GTE 3 6 // Do I print more then the first number? 22 GOTO 38 23 PRINT "1" // Display the second 1. 24 ADD 3 5 25 POKE 3 26 GTE 3 6 // See if we're done yet. 27 GOTO 38 28 ADD 1 2 // Find the next number in the sequence. 29 PUT // And print it. 30 POKE 4 31 PEEK 2 32 POKE 1 // Switich the numbers around. 33 PEEK 4 34 POKE 2 35 ADD 3 5 // Increase the counter and repeat. 36 POKE 3 37 GOTO 26 38 QUIT 39 PRINT "Your number is too big! Please try again." 40 GOTO 8