Now I would like to put it to some use but I realised, that I will never be able to write the VM translator able to generate code optimized enough to really squeeze the entire Hack OS into the 32K ROM + some usefult program written originally in Jack, translated to VM language, translated to ASM and finally to machine code to be uploaded to my physical FPGA-based Hack.
I discovered some working VM translators on the Git Hub, but they are also far from being able to generate optimized code.
I would appreciate if any of you colud be kind enough to share your VM translators with me - one of the best optimizations I can think of is avoiding repeating the code handling the return from the function call - with the VM translator I'm using it's more than 25% of the entire asm code! Possibly your VM translators are able to avoid such a waste of ROM.
Sorry if I'm breaking 2 rules here:
- asking for a project result without actually executing the project (I'm really more into physical Hack realisation vs. writing optimal compilers),
- double posting.