

zero-pack.src ==0801==
   10 * = $4000
   20 start = $1000
   30 finish = $2200
   40 target = $6000
   50 lda #<start
   60 sta $fb
   70 lda #>start
   80 sta $fc
   90 lda #<target
  100 sta $fd
  110 lda #>target
  120 sta $fe
  125 loop = *
  130 lda $fc
  131 cmp #>finish
  132 bne lp1
  139 jsr zgraphic
  140 jsr tgraphic
  141 rts
  142 lp1 = *
  145 ldy #0
  150 lda ($fb),y
  160 beq zero
  170 cmp #$20
  180 beq twenty
  181 pha
  183 jsr zgraphic
  185 jsr tgraphic
  187 pla
  190 sta ($fd),y
  200 jsr tbump
  210 jmp sbump
  220 zero = *
  230 jsr tgraphic
  231 inc zcount
  232 bne zp3
  235 lda #0
  237 sta ($fd),y
  239 jsr tbump
  240 lda #0
  241 sta ($fd),y
  242 jsr tbump
  248 zp3 = *
  250 jmp sbump
  260 twenty = *
  270 jsr zgraphic
  271 inc tcount
  272 bne tp3
  273 lda #$20
  274 sta ($fd),y
  275 jsr tbump
  280 lda #0
  281 sta ($fd),y
  282 jsr tbump
  289 tp3 = *
  290 jmp sbump
  300 tbump = *
  310 inc $fd
  320 bne tp1
  330 inc $fe
  340 tp1 = *
  350 rts
  360 sbump = *
  370 inc $fb
  380 bne sp1
  390 inc $fc
  400 sp1 = *
  410 jmp loop
  500 zgraphic = *
  510 lda zcount
  520 bne zp2
  530 rts
  540 zp2 = *
  550 lda #$00
  560 sta ($fd),y
  570 jsr tbump
  580 lda zcount
  590 sta ($fd),y
  600 jsr tbump
  610 lda #0
  620 sta zcount
  630 rts
  700 tgraphic = *
  710 lda tcount
  720 bne tp2
  730 rts
  740 tp2 = *
  750 lda #$20
  760 sta ($fd),y
  770 jsr tbump
  780 lda tcount
  790 sta ($fd),y
  800 jsr tbump
  810 lda #0
  820 sta tcount
  830 rts
 1000 zcount byt 0
 1010 tcount byt 0
 5000 end
