+handleCommand ":trace" state =
+ do filename <- prompt "Dump to? "
+ return $ state & ssTracing .~ True & ssDumpFile .~ filename
+handleCommand ":untrace" state =
+ return $ state & ssTracing .~ False & ssDumpFile .~ ""
+handleCommand ":poke8" state =
+ do let machines = state ^. ssMachines
+ let machine = head machines
+ let machine' = machine & registers . ix 7 .~ 25734
+ & memory . ix 5489 .~ 21
+ & memory . ix 5490 .~ 21
+ & memory . ix 5495 .~ 7
+ -- let machine' = machine & memory . ix 5451 .~ 7
+ return $ state & ssMachines .~ (machine' : (tail machines))