An emulated CPU in Java