comparison clojure/com/aurellem/assembly.clj @ 117:bcb5c41626b4

saving progress
author Robert McIntyre <rlm@mit.edu>
date Fri, 16 Mar 2012 17:50:35 -0500
parents e45031af5327
children be4ec0e60c16
comparison
equal deleted inserted replaced
116:e45031af5327 117:bcb5c41626b4
436 0xC3 ; ; return to beginning 436 0xC3 ; ; return to beginning
437 0x1D ; 437 0x1D ;
438 0xD3 ; 438 0xD3 ;
439 ]))) 439 ])))
440 440
441
442
443
444 (defn print-listing [state begin end] 441 (defn print-listing [state begin end]
445 (dorun (map 442 (dorun (map
446 (fn [opcode line] 443 (fn [opcode line]
447 (println (format "0x%04X: 0x%02X" line opcode))) 444 (println (format "0x%04X: 0x%02X" line opcode)))
448 (subvec (vec (memory state)) begin end) 445 (subvec (vec (memory state)) begin end)
449 (range begin end)))) 446 (range begin end)))
447 state)
450 448
451 449 (defn test-input-number
452 450 "Input freestyle buttons and observe the effects at the repl."
453 451 []
454 452 (set-state! (input-number))
455 453 (dotimes [_ 90000] (step (view-memory @current-state 0xD352))))
456 454
457 455
456
457