Fibonacci Element Test

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

Fibonacci Element Test

Zack
Hello,
I have a problem. I am trying to understand how The Fibonacci Element Test works.
It assumes that the result will be returned into RAM[261]. I cant understand this. How it is possible?
Argument 0 is in RAM[256], so in my honest opinion it should be returned into the same cell of RAM.
Reply | Threaded
Open this post in threaded view
|

Re: Fibonacci Element Test

culchie
Hi
I just had this same problem yesterday. Finally, I think I figured out what the problem was.
The compare script expects your bootstrap code to call sys.init in the usual way with a VM Call statement, (and so putting values on the stack for a non-existant calling function) but since the bootstrap code doesn't contain a return these don't get cleared afterwards and so stay on the stack.