changeset 140:aa5b5927e5fe

added driver for dylan's code, verified that it works.
author Dylan Holmes <ocsenave@gmail.com>
date Mon, 19 Mar 2012 05:20:34 -0500
parents 74ec1ac044bb
children d125a294f9d8
files clojure/com/aurellem/assembly.clj
diffstat 1 files changed, 26 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/assembly.clj	Mon Mar 19 05:12:05 2012 -0500
     1.2 +++ b/clojure/com/aurellem/assembly.clj	Mon Mar 19 05:20:34 2012 -0500
     1.3 @@ -673,7 +673,7 @@
     1.4     0x00 ;; var: thing to execute [D374]
     1.5  
     1.6     0x18 ;; end frame
     1.7 -   0xA8 ;; TODO: set jump correctly
     1.8 +   0xA8
     1.9     ]
    1.10    )
    1.11  
    1.12 @@ -1367,8 +1367,8 @@
    1.13          (tick) ;; just complemented A
    1.14  
    1.15          (tick)
    1.16 -        (DE! 0x0800)
    1.17 -        (AF! 0xCF00) ;; change inputs @ A
    1.18 +        (DE! 0x1800)
    1.19 +        (AF! 0x7700) ;; change inputs @ A
    1.20          (tick)
    1.21          (tick)
    1.22          (tick)
    1.23 @@ -1383,7 +1383,8 @@
    1.24          (tick)
    1.25          (tick)
    1.26          (tick)
    1.27 -
    1.28 +        (tick)
    1.29 +        (tick)
    1.30          (d-tick)
    1.31  
    1.32          
    1.33 @@ -1400,8 +1401,27 @@
    1.34    
    1.35  
    1.36  
    1.37 -
    1.38 -
    1.39 +(defn drive-dylan []
    1.40 +  (-> (write-mem-dyl)
    1.41 +      (#(do (println "memory from 0xC00F to 0xC01F:"
    1.42 +                     (subvec (vec (memory %)) 0xC00F 0xC01F)) %))
    1.43 +      (step [])
    1.44 +      (step [])
    1.45 +      (step [])
    1.46 +      (step [:start])
    1.47 +      (step [:select])
    1.48 +      (step [:u :d])
    1.49 +      (step [:a :b :start :select])
    1.50 +      (step [:a])
    1.51 +      (step [:b])
    1.52 +      (step [:a :b])
    1.53 +      (step [:select])
    1.54 +      (step [])
    1.55 +      (step [])
    1.56 +      (step [])
    1.57 +      (#(do (println "memory from 0xC00F to 0xC01F:"
    1.58 +                     (subvec (vec (memory %)) 0xC00F 0xC01F)) %))
    1.59 +      ))
    1.60  
    1.61  (defn test-mode-4
    1.62    ([] (test-mode-4 (write-memory)))