# HG changeset patch # User Robert McIntyre # Date 1346486626 18000 # Node ID a2ff0032119e98ba229f5e2467946b27cd323152 # Parent bb1dc927859b1de598fe0deacef84f216b1794cb changed jump from relative to absolute to allow for display-glyph code greater than 128 numbers. diff -r bb1dc927859b -r a2ff0032119e clojure/com/aurellem/run/adv_choreo.clj --- a/clojure/com/aurellem/run/adv_choreo.clj Fri Aug 31 12:14:47 2012 -0500 +++ b/clojure/com/aurellem/run/adv_choreo.clj Sat Sep 01 03:03:46 2012 -0500 @@ -163,15 +163,16 @@ 0x47 0xBA ;; compare B to D 0x20 ;; skip next section B != D - 7 ;; this is equal to the number of instructions in the next + 8 ;; this is equal to the number of instructions in the next ;; indented region! 0x79 0xBB ;; compare C to E 0x20 ;; JR NZ, skip if C != E - 3 + 4 0xF1 ;; pop AF for stack maintainance! 0x18 - :to-stack-cleanup + :stack-cleanup-low + :stack-cleanup-high ]) display-glyph @@ -219,10 +220,17 @@ stack-cleanup [0xF1 0xE1 0xD1 0xC1] - + + [stack-cleanup-high + stack-cleanup-low] + (disect-bytes-2 (+ start-address (count load-data) + (count handle-glyph-count*) + (count cleanup) + (count display-glyph))) + handle-glyph-count - (replace {:to-stack-cleanup - (+ (count display-glyph) (count cleanup))} + (replace {:stack-cleanup-high stack-cleanup-high + :stack-cleanup-low stack-cleanup-low} handle-glyph-count*)] (println (+ (count display-glyph) (count cleanup))) (concat load-data