comparison clojure/com/aurellem/run/music.clj @ 436:3171cbe077f3

created basic frame system for multiple voices.
author Robert McIntyre <rlm@mit.edu>
date Wed, 25 Apr 2012 12:41:30 -0500
parents 3939ad680681
children 20a9d5faf47c
comparison
equal deleted inserted replaced
435:3939ad680681 436:3171cbe077f3
291 0x07 ;; set TAC to 65536 Hz and activate timer 291 0x07 ;; set TAC to 65536 Hz and activate timer
292 292
293 ;; initialize frame 1 293 ;; initialize frame 1
294 0x21 294 0x21
295 0x00 295 0x00
296 0xD0 ;; set HL to 0xD000 == music-start 296 0xD0 ;; set HL to 0xD000 == music-start 1
297 0x0E 297 0x0E
298 0x00 ;; 0->C 298 0x00 ;; 0->C
299 0x06 299 0x06
300 0x00 ;; 0->B 300 0x00 ;; 0->B
301 301
304 0xF5 ;; push AF 304 0xF5 ;; push AF
305 0xC5 ;; push CB 305 0xC5 ;; push CB
306 0xE5 ;; push HL 306 0xE5 ;; push HL
307 307
308 ;; initialize frame 2 308 ;; initialize frame 2
309 309 0x21
310 0x00
311 0xC0 ;; set HL to 0xC000 == music-start 2
312
313 0xF5 ;; push AF
314 0xC5 ;; push CB
315 0xE5 ;; push HL
316
317
310 318
311 ;; init-2 (0->A,B,C), 0xC000 -> HL 319 ;; init-2 (0->A,B,C), 0xC000 -> HL
312 320
313 ;; push to stack 321 ;; push to stack
314 322
315 ;; SP - 5 323 0xE8 ;; SP + 8
324 6
316 ;; pop from stack 325 ;; pop from stack
317 (music-step music-1) 326 (music-step music-1)
318 ;; save to stack 327 ;; save to stack
319 328
320 329