So my translator passed the simplefuntion and nestedcall tests but it couldn't pass the Fibonacci series test so the first thing i did is make my translator generate bootstrap code that sets SP to 256 and i also made it start with translating Sys.vm first but i still can't pass the test.
Thanks in advance.
I'm assuming that you mean FunctionCalls/FibonacciElement test since that comes after FunctionCalls/NestedCall, not ProgramFlow/FibonacciSeries
NestedCall test is designed so that it can run with or without bootstrap code.
FibonacciElement and StaticsTest both require the boot strap.
The expected way to control bootstrap generation is based on the VMTranslator argument. If it is a file, do not generate the bootstrap. It the argument is a directory, generate the bootstrap. (This method is required if you are submitting your VMTranslator to the Coursera grader.)
Look at the the FibonacciElement.out file. If the RAM (SP) value is 257 instead of 263, you are probably jumping to Sys.init instead of calling it. The boot code needs to write the asm code for "call Sys.init 0".
If you are not already doing so, write the VM source as comments in the generated ASM file. This will make it much easier to debug.