# HG changeset patch # User Robert McIntyre # Date 1346488593 18000 # Node ID a6dcb6236fbc7beba381dfa021808a0ac4642eea # Parent 3fcc395b76ef8ad8db7b70bb95e89d68e6d2e456 clear-screen complete diff -r 3fcc395b76ef -r a6dcb6236fbc clojure/com/aurellem/run/adv_choreo.clj --- a/clojure/com/aurellem/run/adv_choreo.clj Sat Sep 01 03:18:55 2012 -0500 +++ b/clojure/com/aurellem/run/adv_choreo.clj Sat Sep 01 03:36:33 2012 -0500 @@ -198,8 +198,8 @@ ;; clear screen if we are at 0,0 0x57 0xB3 ;; D->A, OR E A ==> (= D E 0) - 0x20 ;; skip clear-screen if D and E are not both zero - :clear-screen-length + ;;0x20 ;; skip clear-screen if D and E are not both zero + ;;:clear-screen-length ]) clear-screen @@ -207,6 +207,30 @@ [;; save all registers 0xC5 0xD5 0xE5 0xF5 + (select-LCD-bank 0) + ;; write 0x00 to memory locations + ;; 0x9800 to 0x9A34 + 0x21 + 0x00 0x98 ;; load 0x9800 into HL + + + 0x16 3 ;; 3 -> D + 0x1E 190 ;; 188 -> E + + 0x3E 0 ;; 0-> A + + ;; begin of do-while loop + 0x22 ;; load 0 to 0x9800 + 0x1D ;; dec E + 0x20 + (->signed-8-bit -4) + 0x15 ;; dec D + 0x1E 190 ;; 188 -> E + 0x20 + (->signed-8-bit -8) + ;; end of do-while-loop + + ;; restore all registers 0xF1 0xE1 0xD1 0xC1 ])