comparison clojure/com/aurellem/gb/rlm_assembly.clj @ 389:bb8978d370d8

saving progress.
author Robert McIntyre <rlm@mit.edu>
date Thu, 12 Apr 2012 12:08:36 -0500
parents a0d0e1a46b1d
children dbf7b5a2e9e7
comparison
equal deleted inserted replaced
388:a0d0e1a46b1d 389:bb8978d370d8
182 (let [[start-high start-low] (disect-bytes-2 start-address) 182 (let [[start-high start-low] (disect-bytes-2 start-address)
183 jump-distance (+ (count (frame-metronome) 183 jump-distance (+ (count (frame-metronome)
184 (read-user-input))) 184 (read-user-input)))
185 185
186 init 186 init
187 [0xAF 0x4F] ;; 0->A; 0->C; 187 [0xAF 0x5F] ;; 0->A; 0->E;
188 188
189 189
190 header
191 [0x47] ;; A->B
192
193 mode-select
194 [0xCB 0x43 ;; last-bit is zero
195 0x28 :to-beginning
196 0x5F];; A->E
197
198 input-section
199 [0xCB 0x4B ;; test bit 0 of E
200 0x28 0x03
201
202
203 0x57 ;; A->D
204
205 0x67 ;; A->H
206 0x6F ;; A->L
207
208 0x47 ;; A->B
209 0x4F ;; A->C
210
211
212
213
214
215
216
190 217
191 ;; HL = here 218 ;; HL = here
192 ;; add C to HL 219 ;; add C to HL
193 ;; jp HL 220 ;; jp HL
194 221