changeset 129:5e4feb77f2d8

removed literal 0xFFs from assembly code since they interfere with the item-list.
author Robert McIntyre <rlm@mit.edu>
date Sat, 17 Mar 2012 19:25:38 -0500
parents 203d64e16156
children 69f241de436d
files clojure/com/aurellem/assembly.clj
diffstat 1 files changed, 14 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/assembly.clj	Sat Mar 17 19:18:01 2012 -0500
     1.2 +++ b/clojure/com/aurellem/assembly.clj	Sat Mar 17 19:25:38 2012 -0500
     1.3 @@ -563,19 +563,20 @@
     1.4  
     1.5  
     1.6  (defn write-memory-assembly []
     1.7 -   [
     1.8 +  [
     1.9     ;; Main Timing Loop
    1.10     ;;   Constantly check for v-blank and Trigger main state machine on
    1.11     ;;   every transtion from v-blank to non-v-blank.
    1.12 -   
    1.13 +    
    1.14     0x18   ; D31D                  ; Variable declaration
    1.15     0x02   ; D31E                   
    1.16     0x00   ; D31F                  ; frame-count
    1.17     0x00   ; D320                  ; v-blank-prev 
    1.18 +   
    1.19 +   0xF0   ; D321                  ; load v-blank mode flags into A
    1.20 +   0x41
    1.21 +   0x00
    1.22  
    1.23 -   0xFA   ; D321                  ; load v-blank mode flags into A
    1.24 -   0x41   ; D322                  
    1.25 -   0xFF   ; D323                  
    1.26  
    1.27     ;; Branch dependent on v-blank.  v-blank happens when the last two
    1.28     ;; bits in A are "01"
    1.29 @@ -668,16 +669,16 @@
    1.30     0x50   ;D354      -->       
    1.31     0xD3   ;D355      -->  D350     
    1.32     
    1.33 -   0xEA   ;D356                    ; load (A), which is 
    1.34 +   0xE0   ;D356                    ; load (A), which is 
    1.35     0x00   ;D357      -->           ; 00010000, into FF00
    1.36 -   0xFF   ;D358      -->  FF00     
    1.37 +   0x00   ;D358      -->  FF00     ;; NO-OP
    1.38  
    1.39     0x06   ;D359
    1.40            ;D35A
    1.41     (Integer/parseInt "11110000" 2) ; "11110000" -> B 
    1.42 -   0xFA   ;D35B                    ; (FF00) -> A
    1.43 +   0xF0   ;D35B                    ; (FF00) -> A
    1.44     0x00   ;D35C                   
    1.45 -   0xFF   ;D35D
    1.46 +   0x00   ;D35D                    ;; NO-OP
    1.47  
    1.48     0xCB   ;D35E                    ; swap nybbles on A
    1.49     0x37   ;D35F
    1.50 @@ -690,17 +691,17 @@
    1.51     0x51   ;D363      -->       
    1.52     0xD3   ;D364      -->  D351     
    1.53     
    1.54 -   0xEA   ;D365                    ; load (A), which is 
    1.55 +   0xE0   ;D365                    ; load (A), which is 
    1.56     0x00   ;D366      -->           ; 00001000, into FF00
    1.57 -   0xFF   ;D367      -->  FF00     
    1.58 +   0x00   ;D367      -->  FF00     ;; NO-OP
    1.59  
    1.60     0x0E   ;D368
    1.61            ;D369
    1.62     (Integer/parseInt "00001111" 2) ; "00001111" -> C 
    1.63  
    1.64 -   0xFA   ;D36A                    ; (FF00) -> A
    1.65 +   0xF0   ;D36A                    ; (FF00) -> A
    1.66     0x00   ;D36B                   
    1.67 -   0xFF   ;D36C
    1.68 +   0x00   ;D36C
    1.69     
    1.70     0xA1   ;D36D                    ; (AND A C) -> A
    1.71     0x4F   ;D36E                    ; A -> C