shaqywacky wrote
My VM seems to be working(woo!). Also, I'm just curious but for anyone who actually reads this: How long would you guess it took you to get your VM implementation done? Mine took forever because of poor choices on the assembler and hardware.
Congratulations on getting your VM translator working. I think that it's the trickiest project in the book.
I was hoping that a student would have replied by now as their experience would be much more relevant than mine since I've been working in the computer industry for 35 years.
I pointed out TECS to an ex-student of mine and figured I should work some of it so I could answer questions he might have. I didn't expect him to go beyond Chapter 6. I did projects 1-6 in 5 evenings after work. My student stalled out in chapter 2, but I had become a TECS addict. I ordered the book.
When the Book got here, I started on the VM translator, again in the evenings after work. I'd never written a VM translator, but the theory's easy enough. The tricky thing is that one needs to learn the machine language rather thoroughly to do a reasonable job. Push, pop, and stack arithmetic were straightforward; call and return were a bit trickier to do efficiently. My code seemed rather long to me so I did some reverse engineering of Pong to find its call and return code. Turns out mine was only a few instructions longer--good enough for now.
The VM took me 6 evenings, with the final "evening" running well into the wee hours of the next day. If your VM took as long as the first half of the book, you're on par with me.
--Mark