Added basic framework for a stack machine implementation.

So far most of the work is on getting simplemain.pc working, but there
is still a lot of inconsistencies to fix up.