C64 Software  <  SCA: The C64 Software Collection / UNCOMPACTOR ZERO

  Run
1000              ORG 20000
1010              ;
1020 PTR0         EQU 249
1030 PTR1         EQU 250
1040 PTR2         EQU 252
1050 PTR3         EQU 254
1060              ;
1070 MARK         EQU 170
1080              ;
1090              ;
1100 EINSP        LDY #0
1110              LDA #<SOURCEANF
1120              LDX #>SOURCEANF
1130              STA PTR1
1140              STX PTR1+1
1150              LDA #<DEST
1160              LDX #>DEST
1170              STA PTR2
1180              STX PTR2+1
1190              LDA #<SOURCEEND
1200              LDX #>SOURCEEND
1210              STA PTR3
1220              STX PTR3+1
1230              ;
1240 LOOP1        JSR GET
1250              CMP #MARK
1260              BEQ ZEROS
1270              JSR PUT
1280              LDA PTR2+1
1290              CMP PTR3+1
1300              BNE LOOP1
1310              LDA PTR2
1320              CMP PTR3
1330              BNE LOOP1
1340              ;
1350              RTS
1360              ;
1370              ;
1380 ZEROS        JSR GET
1390              STA PTR0
1400              LDA #0
1410 ZEROS1       JSR PUT
1420              DEC PTR0
1430              BNE ZEROS1
1440              BEQ LOOP1
1450              ;
1460              ;
1470 GET          LDA (PTR1),Y
1480              LDX #PTR1
1490              BNE INK
1500              ;
1510              ;
1520 PUT          STA (PTR2),Y
1530              LDX #PTR2
1540              ;
1550              ;
1560 INK          INC 0,X
1570              BNE INK1
1580              INC 1,X
1590 INK1         RTS
READY.