# HG changeset patch # User Robert McIntyre # Date 1346487535 18000 # Node ID 3fcc395b76ef8ad8db7b70bb95e89d68e6d2e456 # Parent d2d41ecc88e0f709578bbd67cd089c54f1ce7f67 added code to save rows and columns to RAM. diff -r d2d41ecc88e0 -r 3fcc395b76ef clojure/com/aurellem/run/adv_choreo.clj --- a/clojure/com/aurellem/run/adv_choreo.clj Sat Sep 01 03:15:13 2012 -0500 +++ b/clojure/com/aurellem/run/adv_choreo.clj Sat Sep 01 03:18:55 2012 -0500 @@ -204,7 +204,12 @@ ]) clear-screen (flatten - [0 0 0]) + [;; save all registers + 0xC5 0xD5 0xE5 0xF5 + + ;; restore all registers + 0xF1 0xE1 0xD1 0xC1 + ]) init (replace {:clear-screen-length (count clear-screen)} init*) @@ -222,9 +227,11 @@ ;; Reset HL to initial value 0x21 (reverse (disect-bytes-2 data-start)) + 0x78 0x22 ;; BC -> save glyphs-rendered + 0x79 0x22 ;; - 0x78 0x22 ;; B -> save glyphs-rendered - 0x79 0x22 ;; + 0x7A 0x22 ;; D -> rows + 0x7B 0x22 ;; E -> columns ]) stack-cleanup