diff clojure/com/aurellem/run/adv_choreo.clj @ 584:bbed03870072

cosmetic improvements revealed glitch in clear-screen.
author Robert McIntyre <rlm@mit.edu>
date Sat, 01 Sep 2012 10:02:25 -0500
parents 21e4ab461506
children 9159187bbf26
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/run/adv_choreo.clj	Sat Sep 01 09:54:48 2012 -0500
     1.2 +++ b/clojure/com/aurellem/run/adv_choreo.clj	Sat Sep 01 10:02:25 2012 -0500
     1.3 @@ -134,8 +134,8 @@
     1.4          (flatten
     1.5           [;; data region
     1.6            0x18
     1.7 -          4
     1.8 -          0 0 0 0;; current row and column
     1.9 +          2
    1.10 +          0 0;; current row and column
    1.11            ;; save all registers
    1.12            0xC5 0xD5 0xE5 0xF5
    1.13  
    1.14 @@ -179,10 +179,11 @@
    1.15                  0x16 3 ;; 3 -> D
    1.16                  0x1E 190 ;; 188 -> E
    1.17  
    1.18 -                0x3E 0 ;; 0-> A
    1.19 +                ;; Empty space Character ID
    1.20 +                0x3E 16 ;; 0-> A
    1.21  
    1.22                  ;; begin of do-while loop
    1.23 -                   0x22 ;; load 0 to 0x9800
    1.24 +                   0x22 ;; load A to 0x9800
    1.25                     0x1D ;; dec E
    1.26                     0x20
    1.27                     (->signed-8-bit -4)
    1.28 @@ -195,8 +196,7 @@
    1.29                  ;; restore all registers
    1.30                  0xF1 0xE1 0xD1 0xC1])
    1.31  
    1.32 -              ;; RLM: for TESTING ONLY!!!
    1.33 -              clear-screen (repeat 10 0)
    1.34 +              
    1.35                increment-row-column
    1.36                [;; D contains row and E contains column
    1.37                 
    1.38 @@ -241,9 +241,9 @@
    1.39                 ;; RLM: this should be 0x9800, investigate
    1.40                 0x21 0x00 0x98 ;; load HL with something
    1.41                 
    1.42 -               ;;0x06 0
    1.43 -               ;;0x4B  ;; columns (E) -> BC
    1.44 -               ;;0x09  ;; HL += columns
    1.45 +               0x06 0
    1.46 +               0x4B  ;; columns (E) -> BC
    1.47 +               0x09  ;; HL += columns
    1.48  
    1.49  
    1.50                 0xAF ;; 0 -> A
    1.51 @@ -278,6 +278,7 @@
    1.52                (flatten
    1.53                 [;; Render each nybble of A as a character
    1.54                  ;; there are two characters to a glyph.
    1.55 +
    1.56                  0x21
    1.57                  (reverse (disect-bytes-2 data-start))
    1.58                  ;; load row and column into DE
    1.59 @@ -288,7 +289,6 @@
    1.60                  set-HL-from-row-and-column
    1.61  
    1.62                  0xF1 ;; pop A, now A is equal to key input
    1.63 -                0x3E 0xFF ;; RLM: TESTING set A = 0xFF
    1.64                  0xF5 ;; save A
    1.65  
    1.66                  0xE6 0xF0 ;; clear second nybble
    1.67 @@ -316,19 +316,12 @@
    1.68          ;; restore all registers
    1.69          (flatten
    1.70           [;; Reset HL to initial data-start value
    1.71 -          0x44 0x4D ;;HL -> BC
    1.72 -          
    1.73            0x21
    1.74            (reverse (disect-bytes-2 data-start))
    1.75            ;;0x23
    1.76            ;; write variables
    1.77            0x7A 0x22 ;; D -> rows       -> to RAM
    1.78            0x7B 0x22 ;; E -> columns
    1.79 -
    1.80 -          0x78 0x22 ;; RLM: testing store HL
    1.81 -          0x79 0x22
    1.82 -
    1.83 -
    1.84            ])
    1.85           
    1.86          stack-cleanup