c++ implementation of a simple-virtual-machine