comparison clojure/com/aurellem/gb/assembly.clj @ 239:19fd38fe376e

revived a functional version of Dylan's assembly.
author Robert McIntyre <rlm@mit.edu>
date Sun, 25 Mar 2012 00:38:45 -0500
parents d585b91de06c
children 2e751984b42d
comparison
equal deleted inserted replaced
238:e23ab90fcc86 239:19fd38fe376e
1332 (view-register "E" E) 1332 (view-register "E" E)
1333 (view-register "H" H) 1333 (view-register "H" H)
1334 (view-register "L" L) 1334 (view-register "L" L)
1335 )))) 1335 ))))
1336 1336
1337
1338
1339 (defn drive-dylan []
1340 (-> (write-mem-dyl)
1341 (#(do (println "memory from 0xC00F to 0xC01F:"
1342 (subvec (vec (memory %)) 0xC00F 0xC01F)) %))
1343 (step [])
1344 (step [])
1345 (step [])
1346 (step [:start])
1347 (step [:select])
1348 (step [:u :d])
1349 (step [:a :b :start :select])
1350 (step [:a])
1351 (step [:b])
1352 (step [:a :b])
1353 (step [:select])
1354 (step [])
1355 (step [])
1356 (step [])
1357 (#(do (println "memory from 0xC00F to 0xC01F:"
1358 (subvec (vec (memory %)) 0xC00F 0xC01F)) %))
1359 ))
1360
1361 (defn test-mode-4 1337 (defn test-mode-4
1362 ([] (test-mode-4 (write-memory))) 1338 ([] (test-mode-4 (write-memory)))
1363 ([target-state] 1339 ([target-state]
1364 (-> 1340 (->
1365 target-state 1341 target-state