home *** CD-ROM | disk | FTP | other *** search
- 100 open2,8,1,"0:colorizer.1024"
- 110 sys700
- 120 ;
- 130 *=$033c
- 140 .opt o2
- 150 ;
- 160 char1 .byte 1
- 170 char2 .byte 2
- 180 char3 .byte 3
- 190 ;
- 200 color1 .byte 1
- 210 color2 .byte 2
- 220 color3 .byte 6
- 230 ;
- 240 src = $fb
- 250 dest = $fd
- 260 ;
- 270 screen = $0400
- 280 colormem = $d800
- 290 ;
- 300 lda #$ff ;
- 310 sta src ;
- 320 sta dest ;
- 330 lda #>(screen-1) ;
- 340 sta src+1 ;
- 350 lda #>(colormem-1) ;
- 360 sta dest+1 ;
- 370 ldx #4 ;
- 380 ;
- 390 mainloop ldy #250 ;
- 400 ;
- 410 ml2 lda (src),y ;
- 420 cmp char1 ;
- 430 bne ml3 ;
- 440 lda color1 ;
- 450 bpl savcolor ;
- 460 ;
- 470 ml3 cmp char2 ;
- 480 bne ml4 ;
- 490 lda color2 ;
- 500 bpl savcolor ;
- 510 ;
- 520 ml4 cmp char3 ;
- 530 bne ml5 ;
- 540 lda color3 ;
- 550 ;
- 560 savcolor sta (dest),y ;
- 570 ;
- 580 ml5 dey ;
- 590 bne ml2 ;
- 600 ;
- 610 clc ;
- 620 lda #250 ;
- 630 adc src ;
- 640 sta src ;
- 650 bcc nc1 ;
- 660 inc src+1 ;
- 670 clc ;
- 680 ;
- 690 nc1 lda #250 ;
- 700 adc dest ;
- 710 sta dest ;
- 720 bcc nc2 ;
- 730 inc dest+1 ;
- 740 ;
- 750 nc2 dex ;
- 760 beq finish ;
- 770 jmp mainloop ;
- 780 ;
- 790 finish rts ;
-