Simple C++ program to simulate a 16-bit CPU