1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
.org 0 init: cps ; Clear the Processor Status register. start: and #0 ; Reset the accumulator. tab ; tax ; tay ; inb ; clc ; fib: tya ; aab ; Add x with y. But did we also carry over? bcs start ; Yes, so restart. tax ; tya ; tab ; txa ; tay ; jmp fib ; No, so keep looping. a d