Krozu wrote
Is there any reason not to remove bootstrap code and simply place Sys.vm assembly code at the front of the .asm file?
Sys.jack will eventually be written by the student in chapter 12. There is no guarantee that Sys.init() will be the first function in the Sys class. At minimum, you should jump to Sys.init. This also eliminates you requirement that Sys.vm be the first file processed.
My bootstrap has an infinite loop after it calls Sys.init(). It's much easier to debug your Sys.init() if the machine does something sensible when Sys.init() accidentally returns. If there is not a complete stack frame available when Sys.init() returns, you'll end up jumping through an uninitialized return IP.
If you write assembly language subroutines to handle the bulk of call and return, then the added code to call Sys.init() is minimal. The only time I've overflowed the stack has been with bad recursive code.
--Mark