comparison clojure/com/aurellem/run/adv_choreo.clj @ 569:3fcc395b76ef

added code to save rows and columns to RAM.
author Robert McIntyre <rlm@mit.edu>
date Sat, 01 Sep 2012 03:18:55 -0500
parents d2d41ecc88e0
children a6dcb6236fbc
comparison
equal deleted inserted replaced
568:d2d41ecc88e0 569:3fcc395b76ef
202 :clear-screen-length 202 :clear-screen-length
203 203
204 ]) 204 ])
205 clear-screen 205 clear-screen
206 (flatten 206 (flatten
207 [0 0 0]) 207 [;; save all registers
208 0xC5 0xD5 0xE5 0xF5
209
210 ;; restore all registers
211 0xF1 0xE1 0xD1 0xC1
212 ])
208 213
209 init (replace 214 init (replace
210 {:clear-screen-length (count clear-screen)} init*) 215 {:clear-screen-length (count clear-screen)} init*)
211 ] 216 ]
212 217
220 [0x03 ;; (inc glyphs-rednered) -> glyphs-rendered 225 [0x03 ;; (inc glyphs-rednered) -> glyphs-rendered
221 226
222 ;; Reset HL to initial value 227 ;; Reset HL to initial value
223 0x21 228 0x21
224 (reverse (disect-bytes-2 data-start)) 229 (reverse (disect-bytes-2 data-start))
225 230 0x78 0x22 ;; BC -> save glyphs-rendered
226 0x78 0x22 ;; B -> save glyphs-rendered 231 0x79 0x22 ;;
227 0x79 0x22 ;; 232
233 0x7A 0x22 ;; D -> rows
234 0x7B 0x22 ;; E -> columns
228 ]) 235 ])
229 236
230 stack-cleanup 237 stack-cleanup
231 [0xF1 0xE1 0xD1 0xC1] 238 [0xF1 0xE1 0xD1 0xC1]
232 239