5.2 A Register-Machine Simulator