anchor.diff:      (dex)))
   
   (procedure wait-for-vblank
  -  (lda (imm 0))
  -  (sta vblank-flag)
  +  (poke 0 vblank-flag)
     (as/until :not-zero (lda vblank-flag))
  -  (lda (imm 0))
  -  (sta vblank-flag)
     (rts))
   
   (procedure brk-handler (rti))
  
positive.code: 
    ;; Main loop - wait for vblank, reset PPU registers, do sprite DMA.
    (with-label :loop
  
      (jsr 'reset-sprites)
      (poke 40 *sprite-x*)
  
negative.code: 
  ;;;; Globals
  
  
  
  (defparameter *sprite-x* (zp #xF0))
  (defparameter *sprite-y* (zp #xF1))
  (defparameter *shadow-cr1* (zp #xF2))
  (defparameter *shadow-cr2* (zp #xF3))
  (defparameter *shadow-scroll-x* (zp #xF4))
  (defparameter *shadow-scroll-y* (zp #xF5))
  
  (defparameter *oamidx* (zp #xFE))
  (defparameter vblank-flag (zp #xFF))
  
  (defparameter *oam-shadow* #x0200)
  
  