Mercurial > vba-clojure
comparison clojure/com/aurellem/run/adv_choreo.clj @ 574:be6f46094ad0
implemented video-memory pointer logic.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 01 Sep 2012 04:05:51 -0500 |
parents | 40f62391db9d |
children | 15876b1a0906 |
comparison
equal
deleted
inserted
replaced
573:40f62391db9d | 574:be6f46094ad0 |
---|---|
251 0x16 0] ;; set D to zero | 251 0x16 0] ;; set D to zero |
252 | 252 |
253 set-HL-from-row-and-column | 253 set-HL-from-row-and-column |
254 [;; formula for memory offset is: | 254 [;; formula for memory offset is: |
255 ;; (+ 0x9800 (* 32 row) column) | 255 ;; (+ 0x9800 (* 32 row) column) |
256 0xD5 | 256 0xD5 0xC5 ;; push D E B C |
257 | 257 |
258 0xD1 | 258 0x21 0x00 0x98 ;; load HL with 0x9800 |
259 | 259 |
260 0x01 32 00 ;; load 32 into BC | |
261 | |
262 ;; do | |
263 0x09 ;; HL += 32 | |
264 0x15 ;; dec D | |
265 ;; while D != 0 | |
266 0x20 | |
267 (->signed-8-bit -4) | |
268 | |
269 0x4B ;; E->C | |
270 0x15 ;; add columns (E) to HL | |
271 | |
272 0xC1 0xD1 ;; pop C B E D | |
260 ] | 273 ] |
261 | 274 |
262 | 275 |
263 | 276 |
264 | 277 |