org $0000 clra clrb ldaa #6 ; find F6 staa $001E ; n=6 ldaa #1 ; A=F0 ldab #1 ; B=F1 start: staa $001F ; Fn=A aba ; A=A+B dec $001E ; n=n-1 tst $001E ; test if n=0 bne notyet ; if not branch to notyet swi ; software interrupt notyet: ldab $001F ; b=Fn jmp start ; jump to start