68HC11 program that calculates f(n) which goes in sequence 1,1,2,3,5,8,13,21,34..etc
Posted on 2005-04-23
given f(1) = 1 and f(2) = 1 AND f(n) = f(n-1) + f(n-2)
i need a 68HC11 program that will give me the value of f(n) given n
n is given in memory location $C100, and n is positive integer
the result should be stored in accumulator A
also, the content of $C100 should not be changed.
it would be great if i could get a flow chart and the 68HC11 assembly code.
Thank you very much.