changeset 568:d2d41ecc88e0

added skeleton for clear-screen.
author Robert McIntyre <rlm@mit.edu>
date Sat, 01 Sep 2012 03:15:13 -0500
parents dba6bb38d2fb
children 3fcc395b76ef
files clojure/com/aurellem/run/adv_choreo.clj
diffstat 1 files changed, 11 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/run/adv_choreo.clj	Sat Sep 01 03:09:31 2012 -0500
     1.2 +++ b/clojure/com/aurellem/run/adv_choreo.clj	Sat Sep 01 03:15:13 2012 -0500
     1.3 @@ -177,8 +177,7 @@
     1.4  
     1.5          display-glyph
     1.6  
     1.7 -        (let [init
     1.8 -              
     1.9 +        (let [init*
    1.10                (flatten
    1.11                 [0xF1 ;; pop A, now A is equal to key input
    1.12                  ;; BC is current number of glyphs rendered.
    1.13 @@ -197,13 +196,20 @@
    1.14                  0x2A 0x57 ;; row -> D
    1.15                  0x2A 0x5F ;; column -> E
    1.16  
    1.17 -
    1.18 -                
    1.19 +                ;; clear screen if we are at 0,0
    1.20 +                0x57 0xB3 ;; D->A, OR E A ==> (= D E 0)
    1.21 +                0x20 ;; skip clear-screen if D and E are not both zero
    1.22 +                :clear-screen-length
    1.23  
    1.24                  ])
    1.25                clear-screen
    1.26 +              (flatten
    1.27 +               [0 0 0])
    1.28  
    1.29 -              []]
    1.30 +              init (replace
    1.31 +                    {:clear-screen-length (count clear-screen)} init*)
    1.32 +              ]
    1.33 +          
    1.34                (concat init clear-screen))
    1.35                
    1.36