Your VM translator needs to accept either a file or a directory as its argument. If a file is specified, it translates only that file into assembly language. If a directory is specified, all the .vm files in the directory are translated into a single .asm file.
For chapter 8, your final VM translator also has to first write "bootstrap" code to the .asm output and then append the translation of the .vm files.
I wrote my VM translator in Python. If you need help with Python you can email me at
.
--Mark