Is it supposed to set RAM to 256? because then the test fails even if all my output, relatively to the stack starting at 256, are -2 and 8.
My final stack looks like this
However in the vmtest the stack starts at 261 so if I change my test file to set RAM to 261 at the beginning my program passes the test
I ran my translator on Sys.vm and then changed the file name lol. I probably needed to make like a StaticsTest.vm which contains call Sys.init 0 and then run it on this one. Did I get that right now?
I don't follow what you are trying to say. Changed the name of what file? To what? Why?
All of the .vm files you need are right there in the StaticsTest directory.
At the point where you are performing this test, you are supposed to have your full-up translator implemented, which includes the bootstrap code. What the bootstrap code does is detailed at the end of Section 8.3.1.
If you have implemented your translator correctly, all you need to do is run it on the StaticsTest folder and then run the StaticsTest.tst file using the CPU Emulator.
If all else fails, walk through the execution of the .vm files by hand with pen and paper to see why the values in the comparison file are what they are.