fibo start 2000 first stl retadr jsub rdnum ldx zero . again tix buffer jgt endl lda a add b sta tmp lda b sta a lda tmp sta b j again endl lda a sta buffer jsub wrnum ldl retadr rsub . three word 3 zero word 0 one word 1 retadr resw 1 intlen word 3 buffer resw 8 a word 0 b word 1 tmp resw 1 . rdnum ldx zero lda zero rloop td input jeq rloop rd input stch buffer,x tix intlen jlt rloop rsub input byte x'f3' . wrnum ldx zero wloop td output jeq wloop ldch buffer,x wd output tix intlen jlt wloop rsub output byte x'06' end first
搜尋此網誌
[SIC][費氏數列(Fibonacci number)]
過年大掃除翻出以前的東西,SIC的指令都忘記了,不過看起來應該是費氏數列沒錯吧!?
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言