A simple CPU simulator