# HG changeset patch # User Robert McIntyre # Date 1346511745 18000 # Node ID bbed038700721c8a57fe5266dad329c77b5384e6 # Parent 21e4ab461506340eff1fa0c459b9f3daa323883f cosmetic improvements revealed glitch in clear-screen. diff -r 21e4ab461506 -r bbed03870072 clojure/com/aurellem/run/adv_choreo.clj --- a/clojure/com/aurellem/run/adv_choreo.clj Sat Sep 01 09:54:48 2012 -0500 +++ b/clojure/com/aurellem/run/adv_choreo.clj Sat Sep 01 10:02:25 2012 -0500 @@ -134,8 +134,8 @@ (flatten [;; data region 0x18 - 4 - 0 0 0 0;; current row and column + 2 + 0 0;; current row and column ;; save all registers 0xC5 0xD5 0xE5 0xF5 @@ -179,10 +179,11 @@ 0x16 3 ;; 3 -> D 0x1E 190 ;; 188 -> E - 0x3E 0 ;; 0-> A + ;; Empty space Character ID + 0x3E 16 ;; 0-> A ;; begin of do-while loop - 0x22 ;; load 0 to 0x9800 + 0x22 ;; load A to 0x9800 0x1D ;; dec E 0x20 (->signed-8-bit -4) @@ -195,8 +196,7 @@ ;; restore all registers 0xF1 0xE1 0xD1 0xC1]) - ;; RLM: for TESTING ONLY!!! - clear-screen (repeat 10 0) + increment-row-column [;; D contains row and E contains column @@ -241,9 +241,9 @@ ;; RLM: this should be 0x9800, investigate 0x21 0x00 0x98 ;; load HL with something - ;;0x06 0 - ;;0x4B ;; columns (E) -> BC - ;;0x09 ;; HL += columns + 0x06 0 + 0x4B ;; columns (E) -> BC + 0x09 ;; HL += columns 0xAF ;; 0 -> A @@ -278,6 +278,7 @@ (flatten [;; Render each nybble of A as a character ;; there are two characters to a glyph. + 0x21 (reverse (disect-bytes-2 data-start)) ;; load row and column into DE @@ -288,7 +289,6 @@ set-HL-from-row-and-column 0xF1 ;; pop A, now A is equal to key input - 0x3E 0xFF ;; RLM: TESTING set A = 0xFF 0xF5 ;; save A 0xE6 0xF0 ;; clear second nybble @@ -316,19 +316,12 @@ ;; restore all registers (flatten [;; Reset HL to initial data-start value - 0x44 0x4D ;;HL -> BC - 0x21 (reverse (disect-bytes-2 data-start)) ;;0x23 ;; write variables 0x7A 0x22 ;; D -> rows -> to RAM 0x7B 0x22 ;; E -> columns - - 0x78 0x22 ;; RLM: testing store HL - 0x79 0x22 - - ]) stack-cleanup