I sense a disturbance in the force.<smiley image="anim_confused.gif"/> I am testing my vm translator using the supplied test in chapter 8. The test i am working on is simple function. When i look at the tst file, in the setup section for the CPU emulator Ram = 1000 however in the VM emulator tst file Ram = 9. Has anyone else seen this. If so which one is the correct value at that location.
Oh and by the way. Many thanks to all those who helped me Especially you Cadet.
Good eyes! I don't recall anyone else asking about that.
Those 5 values after the 2 arguments are the stack frame that the "call SimpleFunction.test 2" would have set up before it entered the function. The saved pointer values will be copied into their registers by the "return".
The return IP is a ROM address in the CPUEmulator and a VM code line number in the VMEmulator.
For the CPUEmulator, your code will return to 1000 and continue running for up to 300 empty instructions.
For the VMEmulator, the return instructions is the last instruction executed.