Finished with FibonacciElement

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Finished with FibonacciElement

gs99
It has taken me more than 2 months but I finally have a program that generates asm instructions that finish correctly!

When starting this project and running CPU Emulator with initial attempts, I had no idea what was not working.
 
One thing I did was make a simpler project (TestProjectParts) that doesn't have the complexity of FibonacciElement, which has about 17 changes in the Call Stack. I needed to see the mechanics of a single call, function, and return before proceeding with multiples in FE.

In the process, I've learned more about Python as I've written several major versions.

I need a vacation!
Reply | Threaded
Open this post in threaded view
|

Re: Finished with FibonacciElement

gs99
I also ran the project to compute the 6th element.
 
In Sys.vm:
function Sys.init 0
push constant 6
call Main.fibonacci 1   // Compute the 6'th fibonacci element

It correctly ends with value 8 in ram 261.