C64 Software  <  SCA: The C64 Software Collection / P'''OMAT

  Run
1000              ;
1010              ;P'M #1.0
1020              ;
1030              ORG 49152
1040              ;
1050              ;
1060 PTR0         EQU 250
1070 PTR1         EQU 251
1080 BILDCNTR     EQU 253
1090 COLPTR1      EQU 254
1100 COLPTR2      EQU 255
1110 KEYFLAG      EQU 2
1120              ;
1130 MARK         EQU 191
1140 CODE1        EQU 170
1150 MAXPIC       EQU 20
1160              ;
1170              ;
1180              ;
1190              ;
1200 INIT         LDA #0
1210              STA BILDCNTR
1220              JSR GETPIC
1230              LDA #11
1240              STA 53265
1250              LDA #7
1260              STA 53280
1270              LDA #0
1280              STA 53281
1290              LDA #24
1300              STA 53272
1310              LDA #216
1320              STA 53270
1330              LDA #151
1340              STA 56576
1350              ;
1360              LDX #0
1370 ILOOP1       LDA COLPTR1
1380              STA $0400,X
1390              STA $0500,X
1400              STA $0600,X
1410              STA $0700,X
1420              STA $4400,X
1430              STA $4500,X
1440              STA $4600,X
1450              STA $4700,X
1460              LDA COLPTR2
1470              STA $D800,X
1480              STA $D900,X
1490              STA $DA00,X
1500              STA $DB00,X
1510              DEX
1520              BNE ILOOP1
1530              LDA #59
1540              STA 53265
1550              BNE MAIN1
1560              ;
1570              ;
1580 MAIN         LDX KEYFLAG
1590              BEQ MAIN1
1600              ;
1610 KEYLOOP      JSR 65508
1620              BEQ KEYLOOP
1630              ;
1640 MAIN1        LDA 56576
1650              EOR #1
1660              STA 56576
1670              ;
1680              LDX BILDCNTR
1690              CPX #MAXPIC
1700              BNE MAIN2
1710              LDX #0
1720 MAIN2        INX
1730              STX BILDCNTR
1740              ;
1750              JSR GETPIC
1760              ;
1770              JMP MAIN
1780              ;
1790              ;
1800 GETPIC       JSR $FFE7 ; CLALL
1810              LDA #2
1820              LDX #8
1830              TAY
1840              JSR $FFBA
1850              LDA BILDCNTR
1860              CLC
1870              ADC #65
1880              STA NAME+9
1890              LDA #10   ; LAENGE
1900              LDX #<NAME
1910              LDY #>NAME
1920              JSR $FFBD
1930              LDA #0
1940              JSR $FFC0 ; OPEN
1950              LDX #2
1960              JSR $FFC6 ; CHKIN
1970              ;
1980              JSR GET
1990              STA PTR1
2000              JSR GET
2010              STA PTR1+1
2020              ;
2030 LOOP1        JSR GET
2040              CMP #MARK
2050              BEQ GLEICHE
2060              JSR PUT
2070 LOOP2        LDA $90
2080              BEQ LOOP1
2090              LDX #2
2100              JSR $FFCC ;RUCKSETZEN
2110              LDA #2
2120              JSR $FFC3 ;CLOSE
2130              ;
2140              RTS
2150              ;
2160              ;
2170 GLEICHE      JSR GET
2180              STA PTR0
2190              JSR GET
2200 GLEICHE1     JSR PUT
2210              DEC PTR0
2220              BNE GLEICHE1
2230              BEQ LOOP2
2240              ;
2250              ;
2260 GET          JSR $FFCF ;BYTE LESEN
2270              CLC
2280              ADC #CODE1
2290              RTS
2300              ;
2310              ;
2320 PUT          SEI
2330              LDY #52
2340              STY 1
2350              LDY #0
2360              STA (PTR1),Y
2370              INC PTR1
2380              BNE PUT1
2390              INC PTR1+1
2400 PUT1         LDY #55
2410              STY 1
2420              CLI
2430              RTS
2440              ;
2450 NAME         DFB ""
READY.