comparison clojure/com/aurellem/run/adv_choreo.clj @ 587:e180f52b2079

remove unnecessary code.
author Robert McIntyre <rlm@mit.edu>
date Sat, 01 Sep 2012 10:08:26 -0500
parents af3ca2f51bad
children 6e9368c371d5
comparison
equal deleted inserted replaced
586:af3ca2f51bad 587:e180f52b2079
204 ;; column to 0 and increment row 204 ;; column to 0 and increment row
205 0x1C ;; inc E 205 0x1C ;; inc E
206 0x3E 20 0xBB ;; compare E to 20 206 0x3E 20 0xBB ;; compare E to 20
207 0x20 207 0x20
208 3 208 3
209 0x14 209 0x14 ;; increment row
210 0x1E 0 210 0x1E 0 ;; set column to 0
211 211
212 212
213 ;; if row==18, set row to 0
213 0x3E 18 214 0x3E 18
214 0xBA 215 0xBA
215 0x20 216 0x20
216 2 217 2
217 0x16 0 218 0x16 0]
218
219 ;; 0x00 ;;0x1C ;; inc E
220 ;; 0x3E 20 0xBB ;; compare E to 20
221 ;; 0x20 ;; if E is 20
222 ;; 3
223 ;; 0x1E 0 ;; set E to zero
224 ;; 0x00; 0x14 ;; (inc D) -> D
225
226 ;; ;; every time row (D) reaches 18, set row to 0
227 ;; 0x3E 18 0xBA ;; compare D to 18
228 ;; 0x20 ;; if D is 18
229 ;; 2
230 ;; 0x16 0
231 ;; set D to zero
232 ]
233 219
234 set-HL-from-row-and-column 220 set-HL-from-row-and-column
235 (flatten 221 (flatten
236 [;; formula for memory offset is: 222 [;; formula for memory offset is:
237 ;; (+ 0x9800 (* 32 row) column) == 223 ;; (+ 0x9800 (* 32 row) column) ==
238 ;; (+ 0x97E0 (* 32 (+ 1 row)) column) 224 0x21 0x00 0x98 ;; load HL with 0x9800
239 0xD5 ;; push DE
240
241 ;; RLM: this should be 0x9800, investigate
242 0x21 0x00 0x98 ;; load HL with something
243 225
244 0x06 0 226 0x06 0
245 0x4B ;; columns (E) -> BC 227 0x4B ;; columns (E) -> BC
246 0x09 ;; HL += columns 228 0x09 ;; HL += columns
247 229
252 0x0E 32 ;; load 32 into BC 234 0x0E 32 ;; load 32 into BC
253 235
254 0xBA ;; CP A D 236 0xBA ;; CP A D
255 0x28 ;; skip this next section if A == D 237 0x28 ;; skip this next section if A == D
256 4 238 4
257 ;;(+ 32 3)
258 0x09 ;; HL += 32 239 0x09 ;; HL += 32
259 ;;(repeat 32 0x23)
260 0x3C 240 0x3C
261 0x18 241 0x18
262 ;;(->signed-8-bit (+ -6 -32)) 242
263 (->signed-8-bit -7) 243 (->signed-8-bit -7)
264 ;; 0x14 ;; inc D to handle case where D == 0
265 ;; ;; D will never be > 20, so this will never overflow.
266
267 ;; ;; do
268 ;; 0x09 ;; HL += 32
269 ;; 0x15 ;; dec D
270 ;; ;; while D != 0
271 ;; 0x20
272 ;; (->signed-8-bit -4)
273
274 0xD1 ;; pop DE
275 ]) 244 ])
276 245
277 render-glyph 246 render-glyph
278 (flatten 247 (flatten
279 [;; Render each nybble of A as a character 248 [;; Render each nybble of A as a character