comparison clojure/com/aurellem/gb/rlm_assembly.clj @ 380:4d2767423266

leave HL unmolested
author Robert McIntyre <rlm@mit.edu>
date Wed, 11 Apr 2012 12:36:30 -0500
parents f86bd04bd9fc
children 1bfa43d35403
comparison
equal deleted inserted replaced
379:f86bd04bd9fc 380:4d2767423266
65 65
66 (defn frame-metronome [] 66 (defn frame-metronome []
67 (let [init [0x06 155] ;; init B to out of LY range 67 (let [init [0x06 155] ;; init B to out of LY range
68 timing-loop 68 timing-loop
69 [0x47 ;; A->B 69 [0x47 ;; A->B
70 0x16
71 0xFE ;; load FF into D without repeats
72 0x14
70 73
71 0x26 74 0x1E
72 0xFE ;; load FF into H without repeats 75 0x43 ;; load 44 into E without repeats
73 0x24 76 0x1C
74
75 0x2E
76 0x43 ;; load 44 into L without repeats
77 0x2C
78 77
79 0x7E] ;; (HL) -> A, now A = LY (vertical line coord) 78 0x1A] ;; (DE) -> A, now A = LY (vertical line coord)
80 continue-if-different 79 continue-if-different
81 [0xB8 ;; compare A with B 80 [0xB8 ;; compare A with B
82 0x28 81 0x28
83 (->signed-8-bit 82 (->signed-8-bit
84 (+ -3 (- (count timing-loop)))) 83 (+ -3 (- (count timing-loop))))