C64 Software  <  SCA: The C64 Software Collection / MISSION 2 V4.4

  Run
1000              ;
1010              ;MISSION 2 V4.4
1020              ;
1030              ORG 6144
1040              ;
1050 BILDCNTR     EQU 2
1060 PTR1         EQU 87
1070 PTR2         EQU 89
1080 LPTR         EQU 174
1090 COLPTR       EQU 251
1100 PTR98        EQU 252
1110 PTR99        EQU 253
1120 MSB          EQU 254
1130 MSB2         EQU 255
1140              ;
1150 SOURCEANF    EQU 32784
1160              ;
1170              ;
1180 COL1         EQU 15
1190              ;
1200              ;
1210 MARK         EQU 191
1220 CODE1        EQU 0   ; ADC
1230 CODE2        EQU 0   ; EOR
1240              ;
1250              ;
1260              ;
1270              ;
1280 INIT         LDA #11
1290              STA 53265
1300              LDY #0
1310              STY 53280
1320              STY 53281
1330              LDA #24
1340              STA 53272
1350              LDA #216
1360              STA 53270
1370              LDA #150
1380              STA 56576
1390              ;
1400              JSR LADEN
1410              JMP DOIT
1420              ;
1430              ;
1440              ;
1450 LADEN        JSR $FFE7 ; CLALL
1460              LDA #2
1470              LDX #8
1480              LDY #2
1490              JSR $FFBA
1500              LDA #11   ; LAENGE
1510              LDX #<NAME
1520              LDY #>NAME
1530              JSR $FFBD
1540              LDA #0
1550              JSR $FFC0 ; OPEN
1560              LDX #2
1570              JSR $FFC6 ; CHKIN
1580              ;
1590              JSR LGET
1600              LDA #16
1610              STA LPTR
1620              JSR LGET
1630              LDA #128
1640              STA LPTR+1
1650              ;
1660 LADEN1       JSR LGET
1670              JSR LPUT
1680              LDA $90
1690              BEQ LADEN1
1700              LDX #2
1710              JSR $FFCC ;RUCKSETZEN
1720              LDA #2
1730              JMP $FFC3 ;CLOSE
1740              ;
1750              ;
1760              ;
1770              ;
1780 LGET         JSR $FFCF ;BYTE LESEN
1790              CLC
1800              ADC #CODE1
1810              EOR #CODE2
1820              RTS
1830              ;
1840              ;
1850 LPUT         SEI
1860              LDY #52
1870              STY 1
1880              LDY #0
1890              STA (LPTR),Y
1900              INC LPTR
1910              BNE LPUT1
1920              INC LPTR+1
1930 LPUT1        LDY #55
1940              STY 1
1950              CLI
1960              RTS
1970              ;
1980              ;
1990              ;
2000              ;
2010 DOIT         LDY #0
2020              STY PTR98
2030              STY COLPTR
2040              LDA #113
2050              STA MSB
2060              ;
2070              ;
2080 CLR          STY PTR1
2090              LDA #32
2100              STA PTR1+1
2110              LDX #96
2120              TYA
2130 CLR1         STA (PTR1),Y
2140              INY
2150              BNE CLR1
2160              INC PTR1+1
2170              DEX
2180              BNE CLR1
2190              ;
2200              ;
2210              LDA #COL1
2220 ILOOP1       STA $0400,Y
2230              STA $0500,Y
2240              STA $0600,Y
2250              STA $0700,Y
2260              STA $4400,Y
2270              STA $4500,Y
2280              STA $4600,Y
2290              STA $4700,Y
2300              DEY
2310              BNE ILOOP1
2320              ;
2330              ;
2340              ;
2350 MAINLOOP     LDX COLPTR
2360              INX
2370              CPX #7
2380              BNE MAIN1
2390              LDX #0
2400 MAIN1        STX COLPTR
2410              ;
2420              LDA COLTAB,X
2430 MAIN2        STA $D800,Y
2440              STA $D900,Y
2450              STA $DA00,Y
2460              STA $DB00,Y
2470              DEY
2480              BNE MAIN2
2490              ;
2500              LDA #<SOURCEANF
2510              STA PTR1
2520              LDA #>SOURCEANF
2530              STA PTR1+1
2540              ;
2550              LDX #11   ;ANZ BILDER
2560              STX BILDCNTR
2570              ;
2580              ;
2590 MAIN3        JSR GETPIC
2600              ;
2610              LDA 56576
2620              EOR #1
2630              STA 56576
2640              LDA #59
2650              STA 53265
2660              ;
2670              ;
2680              DEC BILDCNTR
2690              BNE MAIN3
2700              JMP MAINLOOP
2710              ;
2720              ;
2730              ;
2740 GETPIC       LDA MSB
2750              EOR #64
2760              STA MSB
2770              ;
2780              LDX #128
2790              STX PTR2
2800              STA PTR2+1
2810              ;
2820              CLC
2830              ADC #14
2840              STA MSB2
2850              SEI
2860              LDA #52
2870              STA 1
2880              ;
2890              DEC PTR98
2900              BMI LOOP1
2910              BEQ LOOP1
2920              TYA
2930              BEQ GLEICHE1
2940              ;
2950              ;
2960 LOOP1        JSR GET
2970              CMP #MARK
2980              BEQ GLEICHE
2990              JSR PUT
3000              JMP LOOP1
3010              ;
3020              ;
3030 GLEICHE      JSR GET
3040              STA PTR98
3050              JSR GET
3060 GLEICHE1     JSR PUT
3070              DEC PTR98
3080              BNE GLEICHE1
3090              BEQ LOOP1
3100              ;
3110              ;
3120              ;
3130 GET          LDA (PTR1),Y
3140              INC PTR1
3150              BNE GET1
3160              INC PTR1+1
3170 GET1         RTS
3180              ;
3190              ;
3200 PUT          STA (PTR2),Y
3210              INC PTR2
3220              BNE PUT1
3230              INC PTR2+1
3240              ;
3250 PUT1         LDX PTR2+1
3260              CPX MSB2
3270              BEQ PUT2
3280              RTS
3290              ;
3300 PUT2         LDX PTR2
3310              CPX #64
3320              BEQ BILDFERTG
3330              RTS
3340              ;
3350 BILDFERTG    PLA
3360              PLA
3370              LDA #55
3380              STA 1
3390              CLI
3400              RTS
3410              ;
3420              ;
3430 COLTAB       DFB 14,6,4,2,5,3
3440              ;
3450 NAME         DFB ""
READY.