C64 Software  <  SCA: The C64 Software Collection / TRICKOBJ V3.0

  Run
1000              ORG 49152
1010              ;
1020 MAP1         EQU 40960
1030 MAP2         EQU 57344
1040 COLMAP1      EQU 35840
1050 COLMAP2      EQU 52224
1060 HIMEM        EQU 35834
1070              ;
1080 CLS          EQU 160
1090 CKOM         EQU $AEFD
1100 GETBYTX      EQU $B79E
1110              ;
1120 XL           EQU 20
1130 XH           EQU 21
1140 ANZAHLBILDER EQU 78
1150 BILDZAEHLER  EQU 79
1160 ANZAHLPUNKTE EQU 80
1170 PUNKTZAEHLER EQU 81
1180 DURCHLAEUFE  EQU 82
1190 MAPSW        EQU 83
1200 Y1           EQU 87
1210 XL2          EQU 88
1220 XH2          EQU 89
1230 T0           EQU 90
1240 T1           EQU 91
1250 T2           EQU 92
1260 T3           EQU 93
1270 T4           EQU 94
1280 T5           EQU 95
1290 T6           EQU 96
1300 T7           EQU 97
1310 T8           EQU 98
1320 COLORPTR     EQU 139
1330 CTABPTR      EQU 141
1340 MAPMSB       EQU 252
1350 MAPPTR       EQU 253
1360 Y2           EQU 255
1370              ;
1380              ;
1390              ;
1400              ;
1410 INIT         JSR GETPAR
1420              SEI
1430              LDA #53
1440              STA 1
1450              ;
1460              LDA #11
1470              STA 53265
1480              LDA #56
1490              STA 53272
1500              LDA #1
1510              STA MAPSW
1520              JSR SWITCHMAP
1530              JSR SETCOLOR
1540              LDY #11
1550 INIT1        LDA CLEAR,Y
1560              STA CLS,Y
1570              DEY
1580              BPL INIT1
1590              INY
1600              LDX #32
1610              TYA
1620              JSR CLS
1630              LDA #>MAP2
1640              STA CLS+2
1650              LDX #32
1660              TYA
1670              JSR CLS
1680              ;
1690              JSR SETCTAB
1700              LDA #59
1710              STA 53265
1720              ;
1730              ;
1740 MAINLOOP     JSR BILDLOESCHEN
1750              JSR BILDZEICHNEN
1760              JSR SWITCHMAP
1770              DEC BILDZAEHLER
1780              BNE MAINLOOP
1790              JSR SETCTAB
1800              DEC DURCHLAEUFE
1810              BNE MAINLOOP
1820              ;
1830              LDA #55
1840              STA 1
1850              CLI
1860 L2           JSR 65508
1870              BEQ L2
1880              ;
1890              LDA #27
1900              STA 53265
1910              LDA #21
1920              STA 53272
1930              LDA #3
1940              STA 56576
1950              RTS
1960              ;
1970              ;
1980 CLEAR        STA MAP1,Y
1990              INY
2000              BNE CLEAR
2010              INC CLS+2
2020              DEX
2030              BNE CLEAR
2040              RTS
2050              ;
2060              ;
2070 GETPAR       JSR CKOM
2080              JSR GETBYTX
2090              STX ANZAHLBILDER
2100              JSR CKOM
2110              JSR GETBYTX
2120              STX ANZAHLPUNKTE
2130              JSR CKOM
2140              JSR GETBYTX
2150              STX DURCHLAEUFE
2160              RTS
2170              ;
2180              ;
2190 SETCTAB      LDA #>HIMEM
2200              STA CTABPTR+1
2210              LDA #<HIMEM
2220              STA CTABPTR
2230              LDA ANZAHLBILDER
2240              STA BILDZAEHLER
2250              RTS
2260              ;
2270              ;
2280 BILDLOESCHEN LDY #5
2290              LDA (CTABPTR),Y
2300              TAX
2310              DEY
2320              LDA (CTABPTR),Y
2330              ORA MAPMSB
2340              STA CLS+2
2350              SEC
2360              LDA CTABPTR
2370              SBC #2
2380              STA CTABPTR
2390              BCS L6
2400              DEC CTABPTR+1
2410 L6           LDY #0
2420              TYA
2430              JMP CLS
2440              ;
2450              ;
2460 BILDZEICHNEN LDA ANZAHLPUNKTE
2470              STA PUNKTZAEHLER
2480 L5           JSR LINE
2490              DEC PUNKTZAEHLER
2500              BNE L5
2510              RTS
2520              ;
2530              ;
2540 SETCOLOR     LDA #16        ;FARBE
2550              LDY #0
2560              STY COLORPTR
2570              LDX #>COLMAP1
2580              STX COLORPTR+1
2590              JSR SETCOLOR1
2600              LDX #>COLMAP2
2610              STX COLORPTR+1
2620              ;
2630 SETCOLOR1    LDX #4
2640 SC1          STA (COLORPTR),Y
2650              INY
2660              BNE SC1
2670              INC COLORPTR+1
2680              DEX
2690              BNE SC1
2700              RTS
2710              ;
2720              ;
2730 SWITCHMAP    LDA MAPSW
2740              BEQ SWM1
2750              DEC MAPSW
2760              LDA #>MAP1
2770              BNE SWM2
2780 SWM1         INC MAPSW
2790              LDA #>MAP2
2800 SWM2         STA MAPMSB
2810              LDA MAPSW
2820              STA 56576
2830              RTS
2840              ;
2850              ;
2860 SET          TXA   ;YCORD IN X
2870              LSR   ;XCORD IN XL/XH
2880              LSR
2890              AND #254
2900              TAY
2910              LDA TAB,Y
2920              STA MAPPTR
2930              LDA TAB+1,Y
2940              STA MAPPTR+1
2950              TXA
2960              AND #7
2970              CLC
2980              ADC MAPPTR
2990              STA MAPPTR
3000              LDA XL
3010              AND #248
3020              ADC MAPPTR
3030              STA MAPPTR
3040              LDA MAPPTR+1
3050              ADC MAPMSB
3060              ADC XH
3070              STA MAPPTR+1
3080              LDA XL
3090              AND #7
3100              EOR #7
3110              TAX
3120              LDA ZWEIHOCH,X
3130              LDY #0
3140              ORA (MAPPTR),Y
3150              STA (MAPPTR),Y
3160              RTS
3170              ;
3180              ;
3190 LINE         JSR GETLINEPAR
3200              LDY #1
3210              STY T8
3220              STY T5
3230              STY T3
3240              DEY
3250              STY T4
3260              STY T7
3270              STY T6
3280              DEY
3290              LDA XH2
3300              CMP XH
3310              BCC D1
3320              BNE D2
3330              LDA XL2
3340              CMP XL
3350              BCS D2
3360 D1           SEC
3370              LDA XL
3380              SBC XL2
3390              STA T1
3400              LDA XH
3410              SBC XH2
3420              STA T2
3430              STY T8
3440              JMP L998
3450 D2           SEC
3460              LDA XL2
3470              SBC XL
3480              STA T1
3490              LDA XH2
3500              SBC XH
3510              STA T2
3520 L998         LDA Y2
3530              CMP Y1
3540              BCS D3
3550              SEC
3560              LDA Y1
3570              SBC Y2
3580              STA T0
3590              STY T5
3600              JMP L997
3610 D3           SBC Y1
3620              STA T0
3630 L997         LDA T2
3640              BNE D4
3650              LDA T1
3660              CMP T0
3670              BCS D4
3680              LDX T0
3690              STA T0
3700              STX T1
3710              LDA T8
3720              STA T6
3730              LDA T5
3740              STA T7
3750              INY
3760              STY T8
3770              STY T5
3780 D4           LDA T2
3790              LSR
3800              STA XH2
3810              LDA T1
3820              ROR
3830              STA XL2
3840              JMP D11
3850 L800         LDA T8
3860              BMI D5
3870              CLC
3880              ADC XL
3890              STA XL
3900              BCC D6
3910              INC XH
3920              BNE D6
3930 D5           CLC
3940              ADC XL
3950              STA XL
3960              BCS D6
3970              DEC XH
3980 D6           CLC
3990              LDA Y1
4000              ADC T7
4010              STA Y1
4020              CLC
4030              LDA XL2
4040              ADC T0
4050              STA XL2
4060              LDA XH2
4070              ADC #0
4080              STA XH2
4090              INC T3
4100              BNE D7
4110              INC T4
4120 D7           LDA XH2
4130              CMP T2
4140              BCC D11
4150              BNE D8
4160              LDA T1
4170              CMP XL2
4180              BCS D11
4190 D8           SEC
4200              LDA XL2
4210              SBC T1
4220              STA XL2
4230              LDA XH2
4240              SBC T2
4250              STA XH2
4260              LDA T6
4270              BMI D9
4280              CLC
4290              ADC XL
4300              STA XL
4310              BCC D10
4320              INC XH
4330              BNE D10
4340 D9           CLC
4350              ADC XL
4360              STA XL
4370              BCS D10
4380              DEC XH
4390 D10          CLC
4400              LDA Y1
4410              ADC T5
4420              STA Y1
4430 D11          LDX Y1
4440              JSR SET
4450              LDA T4
4460              CMP T2
4470              BCC D12
4480              LDA T1
4490              CMP T3
4500              BCS D12
4510              RTS
4520 D12          JMP L800
4530              ;
4540              ;
4550 GETLINEPAR   LDY #5
4560              LDA (CTABPTR),Y
4570              STA XL
4580              DEY
4590              LDA (CTABPTR),Y
4600              BPL A1
4610              PLA
4620              PLA
4630              JMP L700
4640 A1           STA XH
4650              DEY
4660              LDA (CTABPTR),Y
4670              STA Y1
4680              DEY
4690              LDA (CTABPTR),Y
4700              STA XL2
4710              DEY
4720              LDA (CTABPTR),Y
4730              STA XH2
4740              DEY
4750              LDA (CTABPTR),Y
4760              STA Y2
4770              ;
4780 L700         SEC
4790              LDA CTABPTR
4800              SBC #6
4810              STA CTABPTR
4820              BCS A2
4830              DEC CTABPTR+1
4840 A2           RTS
4850              ;
4860              ;
4870 TAB          DFB   0, 0, 64,1
4880              DFB 128, 2,192,3
4890              DFB   0, 5, 64,6
4900              DFB 128, 7,192,8
4910              DFB   0,10, 64,11
4920              DFB 128,12,192,13
4930              DFB   0,15, 64,16
4940              DFB 128,17,192,18
4950              DFB   0,20, 64,21
4960              DFB 128,22,192,23
4970              DFB   0,25, 64,26
4980              DFB 128,27,192,28
4990              DFB  0,30
5000 ZWEIHOCH     DFB  1,2,4,8,16,32,64,128
READY.