My FibonacciElement ASM file is generating the following output:
| RAM[0] |RAM[261]|
| 464 | 4 |
I am not sure how to approach this error, for every other basic ASM file in project 8, I have been fixing the error by stepping through the ASM program with the CPU emulator line by line but with FibonacciElement.asm being ~560 lines I am finding it really difficult to do so.
I have tried to re-order the .vm files which are translates so the Sys.vm file always goes first and I have tried updating the labels.
Any advice on what might be a good approach to debugging would be greatly appreciated.
looking at your result and the expected result, your value is 2x and your count is one more. It looks like you have looped once too often, check that your compares are doing lt and not le or vice versa , same for gt and ge.