Mercurial > vba-clojure
diff clojure/com/aurellem/run/bootstrap_0.clj @ 342:4e0b64ea7b66
completed testing of item-writer; looks good.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sun, 08 Apr 2012 06:11:29 -0500 |
parents | bf9b9777c3ce |
children | 652c5abee892 |
line wrap: on
line diff
1.1 --- a/clojure/com/aurellem/run/bootstrap_0.clj Sun Apr 08 05:48:13 2012 -0500 1.2 +++ b/clojure/com/aurellem/run/bootstrap_0.clj Sun Apr 08 06:11:29 2012 -0500 1.3 @@ -973,7 +973,7 @@ 1.4 ;; input second nybble 1.5 1.6 0x0C ;; inc C 1.7 - 0x37 ;; (item-hack) set-carry flag no-op 1.8 + 0x0C ;; inc C 1.9 1.10 0x00 ;; (item-hack) no-op 1.11 0xE6 ;; select bottom bits 1.12 @@ -1020,8 +1020,6 @@ 1.13 1.14 ]))) 1.15 1.16 - 1.17 - 1.18 (defn test-item-writer [] 1.19 (-> (read-state "bootstrap-init") 1.20 (set-memory pc-item-list-start 50) 1.21 @@ -1031,3 +1029,18 @@ 1.22 (set-memory-range 1.23 (inc pc-item-list-start) 1.24 (item-writer 0xD162 201 0xD162)))) 1.25 + 1.26 + 1.27 +(defn item-writer-state [] 1.28 + (read-state "item-writer")) 1.29 + 1.30 +(defn test-item-writer-2 [] 1.31 + (let [orig (item-writer-state)] 1.32 + (-> orig 1.33 + (print-listing 0xD162 (+ 0xD162 20)) 1.34 + (run-moves (reduce 1.35 + concat [[:a] [:b]] 1.36 + (repeat 5 [[:a :b :start :select] []]))) 1.37 + ((fn [_] (println "===========") _)) 1.38 + (print-listing 0xD162 (+ 0xD162 20))))) 1.39 + 1.40 \ No newline at end of file