0010 .LI OFF 0020 TEMP1 .EQ $F0 0030 TEMP2 .EQ $F1 0040 TEMP3 .EQ $F2 0050 SCRPNT1 .EQ $F5 0060 SCRPNT2 .EQ $F7 0070 POINTER1 .EQ $F9 0080 POINTER2 .EQ $FB 0090 POINTER3 .EQ $FD 0100 POINTER4 .EQ $EE 0110 MANX .EQ $CB 0120 MANXX .EQ $CA 0130 MANY .EQ $C9 0140 MANSTATE .EQ $C7 0150 NEXTSTATE .EQ $C6 0160 HEIGHT .EQ $ED 0170 PATINDEX .EQ $EC 0180 GRAB.FOOD .EQ $B7 0190 BYFOOD .EQ $B6 0200 AAMSBYT .EQ $10C0 0210 AALSBYT .EQ $10E0 0220 ANTBYT1 .EQ $1000 0230 ANTBYT2 .EQ $1020 0240 ANTBYT3 .EQ $1040 0250 ANTXOLD .EQ $D5 0260 ANTYOLD .EQ $D4 0270 ANTXXOLD .EQ $D3 0280 ANTX .EQ $DC 0290 ANTY .EQ $DB 0300 ANTXX .EQ $DA 0310 PARALYZE .EQ $A2 0320 SPIDERX .EQ $A5 0330 SPIDERY .EQ $A4 0340 SPIDERNUM .EQ $A3 0350 SPIDERBYT1 .EQ $4100 0360 SPIDERBYT2 .EQ $4108 0370 SPIDERBYT3 .EQ $4110 0380 SPIDERBYT4 .EQ $4118 0390 K6 .EQ $A1 0400 INIT.K6 .EQ $A0 0410 K5 .EQ $9F 0420 INIT.K5 .EQ $9E 0430 RANDOM1.Z .EQ $1706 0440 RANDOM2.Z .EQ $1709 0450 K1.Z .EQ $4F0C 0460 ERASE.ANT.Z .EQ $170F 0470 VACATE.ANTS.BLOCKS.Z .EQ $4F06 0480 .OR $6000 0490 .TA $2000 0500 .BS $03 0510 JMP SPIDER.MASTER 0520 JMP PLOT.SPIDER 0530 JMP PLOT.WEB 0540 JMP ERASE.WEB 0550 JMP STING.MAN 0560 .BS $06 0570 ERASE.WEB 0580 STY TEMP1 0590 LDA TEMP3 0600 PHA 0610 TYA 0620 ROR 0630 BCS .1 0640 LDA #$2A 0650 BNE .2 0660 .1 LDA #$55 0670 .2 STA TEMP3 0680 .3 TXA 0690 ASL 0700 ASL 0710 ASL 0720 STA TEMP2 0730 LDA #$08 0740 STA HEIGHT 0750 .4 LDY TEMP2 0760 LDA (SCRPNT1),Y 0770 STA POINTER1+1 0780 CLC 0790 ADC #$60 0800 STA POINTER4+1 0810 LDA (SCRPNT2),Y 0820 STA POINTER1 0830 STA POINTER4 0840 LDY TEMP1 0850 LDA TEMP3 0860 STA (POINTER1),Y 0870 STA (POINTER4),Y 0880 INC TEMP2 0890 DEC HEIGHT 0900 BNE .4 0910 PLA 0920 STA TEMP3 0930 RTS 0940 PLOT.WEB 0950 TXA 0960 PHA 0970 ASL 0980 ASL 0990 ASL 1000 STA TEMP3 1010 TYA 1020 PHA 1030 STA TEMP2 1040 LDA #$08 1050 STA HEIGHT 1060 LDX #$00 1070 .1 LDY TEMP3 1080 LDA (SCRPNT1),Y 1090 STA POINTER1+1 1100 CLC 1110 ADC #$60 1120 STA POINTER4+1 1130 LDA (SCRPNT2),Y 1140 STA POINTER1 1150 STA POINTER4 1160 LDA TEMP2 1170 ROR 1180 BCS .2 1190 LDA TABLE80,X 1200 LDY TEMP2 1210 STA (POINTER1),Y 1220 STA (POINTER4),Y 1230 INX 1240 INC TEMP3 1250 DEC HEIGHT 1260 BNE .1 1270 PLA 1280 TAY 1290 PLA 1300 TAX 1310 RTS 1320 .2 LDA TABLE81,X 1330 LDY TEMP2 1340 STA (POINTER1),Y 1350 STA (POINTER4),Y 1360 INX 1370 INC TEMP3 1380 DEC HEIGHT 1390 BNE .1 1400 PLA 1410 TAY 1420 PLA 1430 TAX 1440 RTS 1450 TABLE80 .HS 6B2A3A3A2E2E2A6B 1460 TABLE81 .HS 7755575775755577 1470 STING.MAN 1480 STA PARALYZE 1490 LDY #$80 1500 STY TEMP1 1510 .15 LDY TEMP1 1520 LDA $C030 1530 .16 DEY 1540 BNE .16 1550 INC TEMP1 1560 BNE .15 1570 LDA #$00 1580 STA TEMP3 1590 STA GRAB.FOOD 1600 STA BYFOOD 1610 LDX MANSTATE 1620 JSR K1.Z 1630 LDX MANXX 1640 LDA #$10 1650 STA HEIGHT 1660 LDA MANY 1670 STA TEMP2 1680 LDA MANX 1690 STA TEMP1 1700 .1 LDY TEMP2 1710 LDA (SCRPNT1),Y 1720 STA POINTER1+1 1730 LDA (SCRPNT2),Y 1740 STA POINTER1 1750 LDY TEMP1 1760 CPY #$2C 1770 BCS .11 1780 CPY #$04 1790 BCC .12 1800 LDA TABLE74,X 1810 STA (POINTER1),Y 1820 .12 INY 1830 CPY #$2C 1840 BCS .13 1850 CPY #$04 1860 BCC .13 1870 LDA TABLE75,X 1880 STA (POINTER1),Y 1890 .13 INY 1900 CPY #$2C 1910 BCS .14 1920 CPY #$04 1930 BCC .11 1940 LDA TABLE74,X 1950 STA (POINTER1),Y 1960 .14 INC TEMP2 1970 DEC HEIGHT 1980 BNE .1 1990 .11 LDA MANY 2000 AND #$07 2010 BEQ .2 2020 LDA #$03 2030 BNE .3 2040 .2 LDA #$02 2050 .3 STA TEMP1 2060 LDA MANY 2070 LSR 2080 LSR 2090 LSR 2100 TAX 2110 .4 LDA AAMSBYT,X 2120 STA POINTER1+1 2130 LDA AALSBYT,X 2140 STA POINTER1 2150 LDY MANX 2160 LDA #$00 2170 STA (POINTER1),Y 2180 INY 2190 STA (POINTER1),Y 2200 INY 2210 STA (POINTER1),Y 2220 INX 2230 DEC TEMP1 2240 BNE .4 2250 LDA #$16 2260 STA MANX 2270 LDA #$6C 2280 STA MANY 2290 LDA #$02 2300 STA MANXX 2310 LDA #$01 2320 STA MANSTATE 2330 STA NEXTSTATE 2340 LDX #$0D 2350 JSR .5 2360 LDX #$0E 2370 JSR .5 2380 LDX #$0F 2390 .5 LDY #$16 2400 JSR .10 2410 LDY #$17 2420 JSR .10 2430 LDY #$18 2440 .10 LDA AAMSBYT,X 2450 EXT2 2460 STA POINTER1+1 2470 LDA AALSBYT,X 2480 STA POINTER1 2490 LDA (POINTER1),Y 2500 AND #$3F 2510 STA TEMP1 2520 LDA #$01 2530 STA (POINTER1),Y 2540 LDA TEMP1 2550 CMP #$20 2560 BCS .6 2570 CMP #$08 2580 BCS .8 2590 CMP #$03 2600 BEQ .7 2610 RTS 2620 .6 AND #$1F 2630 STY TEMP1 2640 TAY 2650 STY TEMP2 2660 LDA ANTBYT1,Y 2670 AND #$3F 2680 STA ANTXOLD 2690 STA ANTX 2700 LDA ANTBYT2,Y 2710 STA ANTYOLD 2720 STA ANTY 2730 LDA ANTBYT3,Y 2740 STA ANTXXOLD 2750 STA ANTXX 2760 JSR ERASE.ANT.Z 2770 JSR VACATE.ANTS.BLOCKS.Z 2780 LDA #$00 2790 LDY TEMP2 2800 STA ANTBYT1,Y 2810 LDY TEMP1 2820 LDA #$01 2830 STA (POINTER1),Y 2840 RTS 2850 .7 JMP ERASE.WEB 2860 .8 AND #$07 2870 STA TEMP3 2880 JSR ERASE.SPIDER 2890 LDY TEMP3 2900 LDA #$00 2910 STA SPIDERBYT4,Y 2920 RTS 2930 TABLE74 .HS 2A2A2A2A555555 2940 TABLE75 .HS 555555552A2A2A 2950 GET.BLOCK4 2960 STY TEMP1 2970 LDX SPIDERBYT2,Y 2980 LDA SPIDERBYT1,Y 2990 TAY 3000 LDA AALSBYT,X 3010 STA POINTER3 3020 LDA AAMSBYT,X 3030 STA POINTER3+1 3040 LDA (POINTER3),Y 3050 LDY TEMP1 3060 AND #$BF 3070 RTS 3080 GET.BLOCK6 3090 LDY SPIDERX 3100 LDX SPIDERY 3110 GET.BLOCK5 3120 LDA AALSBYT,X 3130 STA POINTER3 3140 LDA AAMSBYT,X 3150 STA POINTER3+1 3160 LDA (POINTER3),Y 3170 RTS 3180 SET.BLOCK.WEB 3190 JSR GET.BLOCK6 3200 LDA #$03 3210 STA (POINTER3),Y 3220 RTS 3230 SET.BLOCK.VACANT2 3240 JSR GET.BLOCK6 3250 AND #$40 3260 STA (POINTER3),Y 3270 RTS 3280 SET.BLOCK.SPIDER 3290 JSR GET.BLOCK6 3300 AND #$C0 3310 ORA SPIDERNUM 3320 ORA #$08 3330 STA (POINTER3),Y 3340 RTS 3350 RANDOM3 3360 JSR RANDOM1.Z 3370 CMP #$55 3380 BCC .1 3390 CMP #$AA 3400 BCC .2 3410 LDA #$E1 3420 RTS 3430 .1 LDA #$E2 3440 RTS 3450 .2 LDA #$E3 3460 RTS 3470 CREATE.SPIDER 3480 DEC K6 3490 BEQ .7 3500 RTS 3510 .7 LDA INIT.K6 3520 STA K6 3530 LDY #$08 3540 .2 DEY 3550 BPL .1 3560 RTS 3570 .1 LDA SPIDERBYT4,Y 3580 BNE .2 3590 STY TEMP1 3600 JSR RANDOM1.Z 3610 CMP #$C0 3620 BCS .3 3630 CMP #$80 3640 BCS .4 3650 CMP #$40 3660 BCS .5 3670 LDA #$2B 3680 STA SPIDERBYT1,Y 3690 JSR RANDOM2.Z 3700 AND #$1F 3710 CMP #$1A 3720 BCS .6 3730 CMP #$03 3740 BCC .6 3750 STA SPIDERBYT2,Y 3760 JSR GET.BLOCK4 3770 BNE .6 3780 JSR RANDOM3 3790 CLC 3800 ADC #$04 3810 STA SPIDERBYT3,Y 3820 LDA #$80 3830 STA SPIDERBYT4,Y 3840 RTS 3850 .3 LDA #$04 3860 STA SPIDERBYT1,Y 3870 JSR RANDOM2.Z 3880 AND #$1F 3890 CMP #$1A 3900 BCS .6 3910 CMP #$03 3920 BCC .6 3930 STA SPIDERBYT2,Y 3940 JSR GET.BLOCK4 3950 BNE .6 3960 JSR RANDOM3 3970 STA SPIDERBYT3,Y 3980 LDA #$80 3990 STA SPIDERBYT4,Y 4000 .6 RTS 4010 .4 LDA #$03 4020 STA SPIDERBYT2,Y 4030 JSR RANDOM2.Z 4040 AND #$3F 4050 CMP #$2C 4060 BCS .6 4070 CMP #$04 4080 BCC .6 4090 STA SPIDERBYT1,Y 4100 JSR GET.BLOCK4 4110 BNE .6 4120 JSR RANDOM3 4130 CLC 4140 ADC #$02 4150 STA SPIDERBYT3,Y 4160 LDA #$80 4170 STA SPIDERBYT4,Y 4180 RTS 4190 .5 LDA #$19 4200 STA SPIDERBYT2,Y 4210 JSR RANDOM2.Z 4220 AND #$3F 4230 CMP #$2C 4240 BCS .6 4250 CMP #$04 4260 BCC .6 4270 STA SPIDERBYT1,Y 4280 JSR RANDOM3 4290 CLC 4300 ADC #$06 4310 AND #$F7 4320 STA SPIDERBYT3,Y 4330 LDA #$80 4340 STA SPIDERBYT4,Y 4350 RTS 4360 PLOT.SPIDER 4370 LDA #$0F 4380 STA POINTER1+1 4390 LDY SPIDERNUM 4400 LDA SPIDERBYT4,Y 4410 BPL .6 4420 LDA SPIDERBYT3,Y 4430 AND #$40 4440 BEQ .1 4450 LDA SPIDERBYT1,Y 4460 STA SPIDERX 4470 ROR 4480 BCS .2 4490 LDA #$C0 4500 BNE .4 4510 .2 LDA #$A0 4520 BNE .4 4530 .1 LDA SPIDERBYT1,Y 4540 STA SPIDERX 4550 ROR 4560 BCS .3 4570 LDA #$D0 4580 BNE .4 4590 .3 LDA #$B0 4600 .4 STA POINTER1 4610 LDA #$08 4620 STA HEIGHT 4630 LDA #$00 4640 STA PATINDEX 4650 LDA SPIDERBYT2,Y 4660 STA SPIDERY 4670 ASL 4680 ASL 4690 ASL 4700 STA TEMP1 4710 .5 LDY TEMP1 4720 LDA (SCRPNT1),Y 4730 STA POINTER2+1 4740 CLC 4750 ADC #$60 4760 STA POINTER4+1 4770 LDA (SCRPNT2),Y 4780 STA POINTER4 4790 STA POINTER2 4800 LDY SPIDERX 4810 LDA (POINTER4),Y 4820 LDY PATINDEX 4830 AND (POINTER1),Y 4840 INY 4844 CMP #$80 4846 BCS .8 4850 ORA (POINTER1),Y 4860 .8 INY 4870 STY PATINDEX 4880 LDY SPIDERX 4890 STA (POINTER2),Y 4900 INC TEMP1 4910 DEC HEIGHT 4920 BNE .5 4930 RTS 4940 .6 LDA SPIDERBYT1,Y 4950 STA SPIDERX 4960 ROR 4970 BCS .7 4980 LDA #$F0 4990 BNE .4 5000 .7 LDA #$E0 5010 BNE .4 5020 SPIDER.MASTER 5030 DEC K5 5040 BEQ .1 5050 .2 RTS 5060 .1 LDA INIT.K5 5070 STA K5 5080 JSR CREATE.SPIDER 5090 LDY #$08 5100 .3 DEY 5110 STY SPIDERNUM 5120 BMI .2 5130 LDA SPIDERBYT4,Y 5140 BEQ .3 5150 JSR MOVE.1.SPIDER 5160 LDY SPIDERNUM 5170 BPL .3 5180 MOVE.1.SPIDER 5190 LDA SPIDERBYT1,Y 5200 STA SPIDERX 5210 LDA SPIDERBYT2,Y 5220 STA SPIDERY 5230 LDA SPIDERBYT4,Y 5240 BMI .1 5250 SEC 5260 SBC #$01 5270 STA SPIDERBYT4,Y 5280 BEQ .2 5290 JMP PLOT.SPIDER 5300 .2 LDX SPIDERY 5310 LDY SPIDERX 5320 JMP ERASE.SPIDER 5330 .1 LDA SPIDERBYT3,Y 5340 AND #$40 5350 BEQ .3 5360 LDA SPIDERBYT3,Y 5370 AND #$BF 5380 STA SPIDERBYT3,Y 5390 JMP PLOT.SPIDER 5400 .3 LDX SPIDERY 5410 LDY SPIDERX 5420 JSR GET.BLOCK5 5430 LDY SPIDERNUM 5440 AND #$40 5450 BEQ .4 5460 LDA SPIDERBYT3,Y 5470 AND #$7F 5480 ORA #$20 5490 STA SPIDERBYT3,Y 5500 BPL .5 5510 .4 LDA SPIDERBYT3,Y 5520 BPL .6 5530 JSR RANDOM1.Z 5540 CMP #$18 5550 BCS .7 5560 LDA SPIDERBYT3,Y 5570 AND #$7F 5580 STA SPIDERBYT3,Y 5590 BPL .7 5600 .6 AND #$20 5610 BEQ .5 5620 LDA SPIDERBYT3,Y 5630 ORA #$80 5640 STA SPIDERBYT3,Y 5650 .7 LDA SPIDERBYT3,Y 5660 AND #$DF 5670 STA SPIDERBYT3,Y 5680 .5 LDX SPIDERY 5690 LDA SPIDERBYT3,Y 5700 BPL .8 5710 LDY SPIDERX 5720 JSR PLOT.WEB 5730 JSR SET.BLOCK.WEB 5740 JMP .9 5750 .8 LDY SPIDERX 5760 JSR GET.BLOCK5 5770 AND #$40 5780 BEQ .14 5790 JSR ERASE.SPIDER 5800 JMP .15 5810 .14 JSR ERASE.WEB 5820 .15 JSR SET.BLOCK.VACANT2 5830 .9 LDY SPIDERNUM 5840 EXT1 5850 LDA SPIDERBYT3,Y 5860 AND #$07 5870 TAX 5880 CLC 5890 LDA TABLE90,X 5900 ADC SPIDERX 5910 CMP #$04 5920 BCC .10 5930 CMP #$2C 5940 BCS .10 5950 TAY 5960 LDA TABLE91,X 5970 CLC 5980 ADC SPIDERY 5990 CMP #$1A 6000 BCS .10 6010 CMP #$03 6020 BCC .10 6030 TAX 6040 JSR GET.BLOCK5 6050 STA TEMP1 6060 AND #$BF 6070 BEQ .11 6080 CMP #$03 6090 BEQ .11 6100 CMP #$01 6110 BEQ .12 6120 JSR RANDOM2.Z 6130 AND #$07 6140 LDY SPIDERNUM 6150 STA TEMP1 6160 LDA SPIDERBYT3,Y 6170 AND #$F8 6180 ORA TEMP1 6190 STA SPIDERBYT3,Y 6200 JSR PLOT.SPIDER 6210 JMP SET.BLOCK.SPIDER 6220 .10 LDY SPIDERNUM 6230 LDA #$00 6240 STA SPIDERBYT4,Y 6250 RTS 6260 .11 TYA 6270 LDY SPIDERNUM 6280 STA SPIDERBYT1,Y 6290 TXA 6300 STA SPIDERBYT2,Y 6310 LDA SPIDERBYT3,Y 6320 ORA #$40 6330 STA SPIDERBYT3,Y 6340 JSR PLOT.SPIDER 6350 JMP SET.BLOCK.SPIDER 6360 .12 TYA 6370 LDY SPIDERNUM 6380 STA SPIDERBYT1,Y 6390 STA SPIDERX 6400 TXA 6410 STA SPIDERBYT2,Y 6420 STA SPIDERY 6430 LDA SPIDERBYT3,Y 6440 ORA #$40 6450 STA SPIDERBYT3,Y 6460 LDA #$60 6470 JSR STING.MAN 6480 JSR GET.BLOCK6 6490 CMP #$01 6500 BEQ .13 6510 JSR PLOT.SPIDER 6520 JMP SET.BLOCK.SPIDER 6530 .13 LDY SPIDERX 6540 LDX SPIDERY 6550 JSR ERASE.SPIDER 6560 LDY SPIDERNUM 6570 LDA #$00 6580 STA SPIDERBYT4,Y 6590 RTS 6600 TABLE90 .HS 0001010100FFFFFF 6610 TABLE91 .HS FFFF0001010100FF 6620 ERASE.SPIDER 6630 JSR GET.BLOCK5 6640 AND #$40 6650 BEQ .2 6660 STY TEMP1 6670 TXA 6680 ASL 6690 ASL 6700 ASL 6710 STA TEMP2 6720 LDA #$08 6730 STA HEIGHT 6740 .1 LDY TEMP2 6750 LDA (SCRPNT1),Y 6760 STA POINTER1+1 6770 CLC 6780 ADC #$60 6790 STA POINTER4+1 6800 LDA (SCRPNT2),Y 6810 STA POINTER1 6820 STA POINTER4 6830 LDY TEMP1 6840 LDA (POINTER4),Y 6850 STA (POINTER1),Y 6860 INC TEMP2 6870 DEC HEIGHT 6880 BNE .1 6890 RTS 6900 .LI ON 6910 .2 JMP ERASE.WEB 6920 .LI OFF