Mercurial > vba-clojure
comparison clojure/com/aurellem/run/adv_choreo.clj @ 566:a2ff0032119e
changed jump from relative to absolute to allow for display-glyph code greater than 128 numbers.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 01 Sep 2012 03:03:46 -0500 |
parents | bb1dc927859b |
children | dba6bb38d2fb |
comparison
equal
deleted
inserted
replaced
565:bb1dc927859b | 566:a2ff0032119e |
---|---|
161 [;; if glyphs-rendered = max-glyph count, go directly | 161 [;; if glyphs-rendered = max-glyph count, go directly |
162 ;; to stack-cleanup | 162 ;; to stack-cleanup |
163 | 163 |
164 0x47 0xBA ;; compare B to D | 164 0x47 0xBA ;; compare B to D |
165 0x20 ;; skip next section B != D | 165 0x20 ;; skip next section B != D |
166 7 ;; this is equal to the number of instructions in the next | 166 8 ;; this is equal to the number of instructions in the next |
167 ;; indented region! | 167 ;; indented region! |
168 | 168 |
169 0x79 0xBB ;; compare C to E | 169 0x79 0xBB ;; compare C to E |
170 0x20 ;; JR NZ, skip if C != E | 170 0x20 ;; JR NZ, skip if C != E |
171 3 | 171 4 |
172 0xF1 ;; pop AF for stack maintainance! | 172 0xF1 ;; pop AF for stack maintainance! |
173 0x18 | 173 0x18 |
174 :to-stack-cleanup | 174 :stack-cleanup-low |
175 :stack-cleanup-high | |
175 ]) | 176 ]) |
176 | 177 |
177 display-glyph | 178 display-glyph |
178 | 179 |
179 (let [init | 180 (let [init |
217 0x79 0x22 ;; | 218 0x79 0x22 ;; |
218 ]) | 219 ]) |
219 | 220 |
220 stack-cleanup | 221 stack-cleanup |
221 [0xF1 0xE1 0xD1 0xC1] | 222 [0xF1 0xE1 0xD1 0xC1] |
222 | 223 |
224 [stack-cleanup-high | |
225 stack-cleanup-low] | |
226 (disect-bytes-2 (+ start-address (count load-data) | |
227 (count handle-glyph-count*) | |
228 (count cleanup) | |
229 (count display-glyph))) | |
230 | |
223 handle-glyph-count | 231 handle-glyph-count |
224 (replace {:to-stack-cleanup | 232 (replace {:stack-cleanup-high stack-cleanup-high |
225 (+ (count display-glyph) (count cleanup))} | 233 :stack-cleanup-low stack-cleanup-low} |
226 handle-glyph-count*)] | 234 handle-glyph-count*)] |
227 (println (+ (count display-glyph) (count cleanup))) | 235 (println (+ (count display-glyph) (count cleanup))) |
228 (concat load-data | 236 (concat load-data |
229 handle-glyph-count | 237 handle-glyph-count |
230 display-glyph | 238 display-glyph |