Gabrix wrote
There is any way to execute and test single files?
There is no easy way to deal with testing individual files in a high-level application like Pong, especially in the case of the OS .vm files where you don't have the Jack source code.
You don't need to use your VM translator to complete chapters 9-12. All of the project tests expect that you are using the VMEmulator.
Once you have written your own Jack compiler and OS, it is quite a thrill to run your game in the CPU emulator, compiled with your compiler and translated along with your OS using your VM translator!
I recommend that you precede to chapter 9 and come back to debug your VM translator after chapter 12. You will have OS source available and you can have your compiler write the Jack source into the VM it generates, and those source comments will be carried through to the ASM listing file. With my toolset, the listing file ends up looking like this, which is a great aid in debugging.
/// 125: function void deAlloc(int object) {
/// 126: var Array block;
/// 127: var Array freeBlock;
/// 128: var Array freePrev;
/// 129:
// function Memory.deAlloc 3
3939 (Memory.deAlloc)
3939 3 @3
3940 ECD0 D=-A
3941 ($148)
3941 0 @SP
...
/// 130: if (object = 0) {
// push argument 0
3947 2 @ARG
3948 FC30 AD=M
3949 FC10 D=M
--Mark