changeset 582:393b49a83394

tracked down error to set=HL-from-row-and-column
author Robert McIntyre <rlm@mit.edu>
date Sat, 01 Sep 2012 09:43:19 -0500
parents 5f09601abe8c
children 21e4ab461506
files clojure/com/aurellem/run/adv_choreo.clj
diffstat 1 files changed, 13 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/run/adv_choreo.clj	Sat Sep 01 09:35:07 2012 -0500
     1.2 +++ b/clojure/com/aurellem/run/adv_choreo.clj	Sat Sep 01 09:43:19 2012 -0500
     1.3 @@ -134,8 +134,8 @@
     1.4          (flatten
     1.5           [;; data region
     1.6            0x18
     1.7 -          2
     1.8 -          0 0 ;; current row and column
     1.9 +          4
    1.10 +          0 0 0 0;; current row and column
    1.11            ;; save all registers
    1.12            0xC5 0xD5 0xE5 0xF5
    1.13  
    1.14 @@ -228,7 +228,8 @@
    1.15                 ;; 0x20 ;; if D is 18
    1.16                 ;;   2
    1.17                 ;;   0x16 0
    1.18 -               ] ;; set D to zero
    1.19 +               ;; set D to zero
    1.20 +               ] 
    1.21                 
    1.22                set-HL-from-row-and-column
    1.23                (flatten
    1.24 @@ -314,12 +315,20 @@
    1.25          cleanup
    1.26          ;; restore all registers
    1.27          (flatten
    1.28 -         [;; Reset HL to initial value
    1.29 +         [;; Reset HL to initial data-start value
    1.30 +          0x44 0x4D ;;HL -> BC
    1.31 +          
    1.32            0x21
    1.33            (reverse (disect-bytes-2 data-start))
    1.34            ;;0x23
    1.35 +          ;; write variables
    1.36            0x7A 0x22 ;; D -> rows       -> to RAM
    1.37            0x7B 0x22 ;; E -> columns
    1.38 +
    1.39 +          0x78 0x22 ;; RLM: testing store HL
    1.40 +          0x79 0x22
    1.41 +
    1.42 +
    1.43            ])
    1.44           
    1.45          stack-cleanup