image of READY prompt

Wang2200.org

Listing of file='@MRTIAN' on disk='vmedia/731-8027.wvd.zip'

# Sector 804, program filename = '@MRTIAN'
0015 REM %  PROG = '@MRTIAN" 08/15/89 COPYRIGHT WANG LABORATORIES 1985, 1989
0020 DIM A(4),B(4),B1(4),C(4),C1(4),C2(4),A1(4),A2(4),D(5),D1(5),D2(5),E(5),F(
     5),M(80),Y(14),H(4),H1(4),P(14),S$1
0030 REM **************************************************
   : REM ******** DISPLAY INSTRUCTIONS ********************
   : REM **************************************************
0040 PRINT HEX(0D03060202020F);
0130 PRINT AT(0,30);HEX(020404040E);"MARTIAN WAR";
0140 PRINT AT(2,5);HEX(0F);"THERE IS ONE WEAPON REMAINING ON EARTH.";
0150 PRINT AT(4,5);"THIS WEAPON IS CONTROLLED WITH THE FOLLOWING KEYS;";
0160 PRINT AT(5,20);"4  - MOVE TO LEFT";
0170 PRINT AT(6,20);"5  - STOP";
0180 PRINT AT(7,20);"6  - MOVE TO RIGHT";
0190 PRINT AT(8,20);"8  - FIRE A MISSILE";
0200 PRINT AT(10,5);"THERE WILL BE MARTIAN SPACESHIPS FLYING ALL OVER THE PLAC
     E AND DROPPING";AT(11,10);"BOMBS DOWN ON YOU AND THE HUMAN POPULATION.";
0210 PRINT AT(13,5);"YOUR MISSION IS QUITE SIMPLE. THERE ARE A LIMITED NUMBER
     OF MARTIAN";AT(14,10);"SHIPS AND IF YOU DESTROY ALL OF THEM BEFORE THEY D
     ESTROY THE WHOLE";AT(15,10);"POPULATION OF EARTH THEN YOU WIN.";
0220 PRINT AT(17,5);"IF YOUR WEAPON IS HIT IT WILL HAVE TO BE REPAIRED AND THE
     REFORE";AT(18,10);"WILL BE UNUSABLE FOR A PERIOD OF TIME.";
0230 PRINT AT(20,5);"HIT 'RETURN' TO CONTINUE";
   : LINPUT X$
0240 PRINT HEX(0D0306);
   : PRINT AT(0,30);HEX(020404040E);"MARTIAN WAR";HEX(0F);
0250 PRINT AT(7,5);"WHAT LEVEL OF PLAY WOULD YOU LIKE (1 - 3)";
   : PRINT AT(9,10);"1  -  BEGINNER";
   : PRINT AT(10,10);"2  -  INTERMEDIATE";
   : PRINT AT(11,10);"3  -  ADVANCED";
0260 PRINT AT(7,47);
   : INPUT Q
0270 IF Q<1OR Q>3THEN Q=1
0280 PRINT AT(15,5);"IF YOU WANT SOUND EFFECTS THEN TYPE 'Y' ?";
   : LINPUT S$
   : IF S$<>"Y"THEN S$="N"
0290 REM **************************************************
   : REM ******** INITIALIZE VARIABLES ********************
   : REM **************************************************
0300 PRINT HEX(0D03060202020F);
0310 FOR I=1TO 4
   : A(I),B(I),C(I),C1(I)=0
   : NEXT I
0320 FOR I=1TO 5
   : D(I),E(I),F(I)=0
   : NEXT I
0330 FOR I=1TO 14
   : Y(I)=0
   : NEXT I
0340 FOR I=4TO 73
0350 M(I)=1
0360 NEXT I
0370 I=3
0380 M(I)=2
   : IF I<69THEN M(I+1)=3
   : IF I>69THEN 400
0390 IF I=1THEN I=I+4
   : ELSE I=I+5
   : GOTO 380
0400 M1=14
0410 T1=25
0420 FOR I=1TO 4
   : C(I),C1(I)=1
   : A(I)=1
   : NEXT I
0430 FOR I=1TO 5
   : F(I)=1
   : NEXT I
0440 K$,T$="5"
0450 N=-1
   : C=0
0460 L=0
0470 FOR I=1TO 4
   : H1(I)=-1
   : NEXT I
0480 K=6
0490 FOR J=1TO 14
   : P(J)=K
   : K=K+5
   : NEXT J
0500 REM **************************************************
   : REM ******** DISPLAY PLAYING FIELD *******************
   : REM **************************************************
0510 REM PRINT PLAYING FIELD
0520 PRINT AT(0,0);BOX(24,79);
0530 PRINT AT(0,62);BOX(3,17);
0540 PRINT AT(0,62);BOX(-0,-17);
0550 PRINT AT(0,79);BOX(-3,-0);
0560 PRINT AT(0,65);HEX(020402040E);"MARTIAN WAR";HEX(0F);
0570 PRINT AT(1,64);"MARTIANS -";
   : PRINTUSING "###",T1;
0580 PRINT AT(2,64);"HUMANS   -";
   : PRINTUSING "###",M1;
0590 IF J9=1THEN 1680
0600 REM **************************************************
   : REM ******** MAKE HUMANS RUN OUT *********************
   : REM **************************************************
0610 DATA 11,12,10,10,8,9,6,7,5,5,3,4,1,2
0620 J1=-1
0630 FOR I=1TO 14
0640 RESTORE LINE610,I
0650 READ M
0660 J1=J1*(-1)
0670 IF I=1THEN Y=3
   : ELSE IF I=3THEN Y=1
   : ELSE IF I=5THEN Y=2
   : ELSE IF I=7THEN Y=3
   : ELSE IF I=9THEN Y=1
   : ELSE IF I=11THEN Y=2
   : ELSE IF I=13THEN Y=3
   : ELSE GOTO 690
0680 GOTO 700
0690 IF I=2THEN Y=74
   : ELSE IF I=4THEN Y=73
   : ELSE IF I=6THEN Y=75
   : ELSE IF I=8THEN Y=74
   : ELSE IF I=10THEN Y=73
   : ELSE IF I=12THEN Y=75
   : ELSE Y=74
0700 FOR J=1TO M
0710 IF J1=-1THEN 790
0720 GOSUB '31(Y)
0730 GOSUB '32(Y)
0740 GOSUB '33(Y)
0750 GOSUB '34(Y)
0760 GOSUB '35(Y)
0770 GOSUB '30(Y)
0780 GOTO 850
0790 GOSUB '41(Y)
0800 GOSUB '42(Y)
0810 GOSUB '43(Y)
0820 GOSUB '44(Y)
0830 GOSUB '45(Y)
0840 GOSUB '40(Y)
0850 IF J1=1THEN Y=Y+3
   : ELSE IF J<>MTHEN Y=Y-3
0860 NEXT J
0870 GOSUB '50(Y)
0880 GOSUB '51(Y-1)
0890 GOSUB '200(Y)
0900 NEXT I
0910 GOTO 1670
0920 DEFFN'31(Y)
0930 PRINT AT(21,Y);HEX(E8);
0940 PRINT AT(22,Y);HEX(FAC4);
0950 PRINT AT(23,Y);HEX(EAC9);
0960 RETURN
0970 DEFFN'32(Y)
0980 PRINT AT(21,Y);HEX(A0D4);
0990 PRINT AT(22,Y);HEX(D8DD);
1000 PRINT AT(23,Y);HEX(E8C3C1);
1010 RETURN
1020 DEFFN'33(Y)
1030 PRINT AT(21,Y);HEX(A0E8);
1040 PRINT AT(22,Y);HEX(A0EECC);
1050 PRINT AT(23,Y);HEX(E0C6C9);
1060 RETURN
1070 DEFFN'34(Y)
1080 PRINT AT(21,Y);HEX(A0A0D4);
1090 PRINT AT(22,Y);HEX(A0C8DDD0);
1100 PRINT AT(23,Y);HEX(A0C8C7D4);
1110 RETURN
1120 DEFFN'35(Y)
1130 PRINT AT(21,Y);HEX(A0A0E8);
1140 PRINT AT(22,Y);HEX(A0A0EEC4);
1150 PRINT AT(23,Y);HEX(A0A0EED0);
1160 RETURN
1170 DEFFN'30(Y)
1180 PRINT AT(21,Y);HEX(A0A0A0D4);
1190 PRINT AT(22,Y);HEX(A0A0A0D5);
1200 PRINT AT(23,Y);HEX(A0A0A0F5);
1210 RETURN
1220 DEFFN'41(Y)
1230 PRINT AT(21,Y);HEX(A0A0A0D4);
1240 PRINT AT(22,Y);HEX(A0A0C8D5);
1250 PRINT AT(23,Y);HEX(A0A0C6D5);
1260 RETURN
1270 DEFFN'42(Y)
1280 PRINT AT(21,Y);HEX(A0A0E8A0);
1290 PRINT AT(22,Y);HEX(A0A0EEE4);
1300 PRINT AT(23,Y);HEX(A0C2C3D4);
1310 RETURN
1320 DEFFN'43(Y)
1330 PRINT AT(21,Y);HEX(A0A0D4A0);
1340 PRINT AT(22,Y);HEX(A0CCDDA0);
1350 PRINT AT(23,Y);HEX(A0C8C9D0);
1360 RETURN
1370 DEFFN'44(Y)
1380 PRINT AT(21,Y);HEX(A0E8A0A0);
1390 PRINT AT(22,Y);HEX(E0EECCA0);
1400 PRINT AT(23,Y);HEX(E8CBC4A0);
1410 RETURN
1420 DEFFN'45(Y)
1430 PRINT AT(21,Y);HEX(A0D4A0A0);
1440 PRINT AT(22,Y);HEX(C8DDA0A0);
1450 PRINT AT(23,Y);HEX(E0DDA0A0);
1460 RETURN
1470 DEFFN'40(Y)
1480 PRINT AT(21,Y);HEX(E8A0A0A0);
1490 PRINT AT(22,Y);HEX(EAA0A0A0);
1500 PRINT AT(23,Y);HEX(FAA0A0A0);
1510 RETURN
1520 DEFFN'50(Y)
1530 PRINT AT(21,Y);HEX(FC);
1540 PRINT AT(22,Y);HEX(FF);
1550 PRINT AT(23,Y);HEX(FF);
1560 RETURN
1570 DEFFN'51(Y)
1580 PRINT AT(21,Y);HEX(A0FC);
1590 PRINT AT(22,Y);HEX(EAFFD5);
1600 PRINT AT(23,Y);HEX(A0FF);
1610 RETURN
1620 DEFFN'200(Y)
   : REM PRINT SUCKER'S
1630 PRINT AT(21,Y+1);HEX(FC);
1640 PRINT AT(22,Y);HEX(D7FFEB);
1650 PRINT AT(23,Y);HEX(E0FFD0);
1660 RETURN
1670 REM PRINT 3 SUCKER'S
1680 I=5
1690 GOSUB '200(I)
   : I=I+5
   : IF I>74THEN 1700
   : GOTO 1690
1700 Y=35
1710 GOTO 1730
1720 REM **************************************************
1730 PRINT HEX(020402000F);
1740 REM **************************************************
   : REM ******** MAIN LOOP *******************************
   : REM **************************************************
1750 GOSUB 4110
1760 GOSUB 3850
1770 GOSUB 2050
1780 GOSUB 2400
1790 GOSUB 3760
1800 GOSUB 2050
1810 GOSUB 4180
1820 GOSUB 3240
1830 GOSUB 2050
1840 REM **************************************************
   : REM ******** MOVE USER MISSILE LAUNCHER **************
   : REM **************************************************
1850 IF C=0THEN 1860
   : PRINT AT(1,64);"MARTIAN";
   : C=C-1
   : IF C=0THEN Y=35
   : GOTO 1740
1860 KEYIN K$,1860,1861
1861 IF K$<>HEX(7E)AND K$<>HEX(7F)THEN 1870
   : LOAD RUN
1870 IF K$="8"THEN GOSUB 1980
1880 IF K$="4"THEN Y=Y-1
   : ELSE IF K$="6"THEN Y=Y+1
1890 T$=K$
1900 IF Y<0THEN 1930
   : ELSE IF Y>72THEN 1950
1910 PRINT AT(20,Y);HEX(A0F0F8FFF4F0A0);
1920 GOTO 1750
1930 K$="6"
1940 GOTO 1880
1950 K$="4"
1960 GOTO 1880
1970 REM **************************************************
   : REM ******** INITIALIZE USER MISSILE *****************
   : REM **************************************************
1980 IF N>=0THEN 2020
1990 N=18
2000 M=Y+3
2010 PRINT AT(N,M);HEX(0EFF0F);
2020 K$=T$
2030 RETURN
2040 REM **************************************************
   : REM ******** MOVE USER MISSILE ***********************
   : REM **************************************************
2050 IF N>=0THEN 2060
   : PRINT AT(1,64);"M";
   : RETURN
2060 N=N-2
2070 PRINT AT(N+2,M,1);
2080 IF N<0THEN RETURN
2090 IF M>61AND N<3THEN 2100
   : ELSE GOTO 2120
2100 N=-2
   : RETURN
2110 REM % TEST FOR HIT ON TARGET
2120 FOR I=1TO 4
2130 IF N<>A(I)AND N+1<>A(I)THEN 2160
2140 IF B(I)=0THEN 2160
2150 IF M>=B(I)AND M<B(I)+6THEN GOTO 2330
2160 NEXT I
2170 REM % TEST FOR HIT ON MISSILE
2180 I=1
2190 IF D(I)<=0THEN 2280
2200 IF N<>D(I)AND N+1<>D(I)THEN 2280
2210 IF M<>E(I)THEN 2280
2220 D1(I)=D(I)
2230 IF S$="Y"THEN PRINT HEX(07);
2240 D(I)=-1
2250 D2(I)=2
2260 N=-2
2270 RETURN
2280 IF I=5THEN 2300
2290 I=I+1
   : GOTO 2190
2300 PRINT AT(N,M);HEX(0EFF0F);
2310 RETURN
2320 REM % HIT TARGET
2330 N=-2
2340 B1(I)=B(I)
   : C2(I)=3
   : IF S$="Y"THEN PRINT HEX(07);
2350 B(I)=-1
2360 T1=T1-1
2370 PRINT AT(1,74);
   : PRINTUSING "###",T1;
2380 IF T1=0THEN 4320
2390 RETURN
2400 REM **************************************************
   : REM ******** INITIALIZE MARTIANS *********************
   : REM **************************************************
2410 R1=INT(RND(1)*20)
2420 IF R1<>10THEN GOTO 2630
2430 J=0
2440 FOR I=1TO 4
2450 IF B(I)<>0THEN J=J+1
2460 NEXT I
2470 IF J>=T1THEN 2630
2480 I=1
2490 IF B(I)<=0AND B1(I)=0THEN 2510
2500 IF I=4THEN 2630
   : I=I+1
   : GOTO 2490
2510 R=INT(RND(1)*15)
2520 J=1
2530 IF B(J)=0THEN 2550
2540 IF A(J)=RTHEN 2510
2550 J=J+1
2560 IF J<=4THEN 2530
2570 A(I)=R
2580 R2=INT(RND(1)*4)
2590 IF R2<2THEN B(I)=1
   : ELSE IF A(I)<3THEN B(I)=56
   : ELSE B(I)=70
2600 IF R2<2THEN C1(I)=1
   : ELSE C1(I)=-1
2610 A1(I)=INT(RND(1)*4)+1
   : A2(I)=INT(RND(1)*4)+1
2620 REM **************************************************
   : REM ******** MOVE MARTIANS ***************************
   : REM **************************************************
2630 FOR I=1TO 4
2640 IF B(I)>0THEN 2650
   : PRINT AT(1,64);"MARTIAN";
   : GOTO 3000
2650 IF A1(I)>1THEN 2660
   : C(I)=C(I)*(-1)
   : IF C(I)<>-1THEN 2660
   : PRINT AT(1,64);"MARTIAN";
   : GOTO 3000
2660 IF A1(I)>2THEN 2670
   : IF B(I)<>15AND B(I)<>30AND B(I)<>45AND B(I)<>60THEN 2670
   : R=INT(RND(1)*25)
   : IF R<10THEN C1(I)=-C1(I)
2670 IF A1(I)<>3THEN 2680
   : IF B(I)<Y-4THEN C1(I)=1
   : ELSE IF B(I)>Y+11THEN C1(I)=-1
2680 B(I)=B(I)+C1(I)
2690 IF B(I)>72OR B(I)<1THEN 3090
2700 IF A(I)<3AND B(I)>56THEN 3090
2710 R=INT(RND(1)*40)
2720 IF R<QAND A1(I)<3THEN GOSUB 3120
2730 IF A1(I)<>3THEN 2760
2740 IF B(I)-4<YAND Y<B(I)+11THEN 2750
   : GOTO 2760
2750 IF R<Q*6THEN GOSUB 3120
2760 IF A1(I)<>4THEN 2830
2770 K=1
2780 IF P(K)<>B(I)+3THEN 2810
2790 IF R<Q*12THEN GOSUB 3130
2800 GOTO 2830
2810 K=K+1
   : IF K<=14THEN 2780
2820 REM  PRINT DIFFERENT STAGES IN MARTIAN DISPLAY AND TEST FOR HIT BY USER M
     ISSILE
2830 IF A(I)=NTHEN GOSUB 3030
2840 IF A2(I)=1THEN 2970
   : IF A2(I)=2THEN 2930
   : IF A2(I)=3THEN 2890
2850 C2(I)=MOD(C2(I)+1,2)
2860 PRINT AT(A(I),B(I));
2870 IF C2(I)=1THEN PRINT HEX(A0DDCCFFCCEEA0);
   : ELSE PRINT HEX(A0DDF3FFF3EEA0);
2880 GOTO 3000
2890 C2(I)=MOD(C2(I)+1,2)
2900 PRINT AT(A(I),B(I));
2910 IF C2(I)=1THEN PRINT HEX(A0DDCCFFCCEEA0);
   : ELSE PRINT HEX(A0D5C3FFC3EAA0);
2920 GOTO 3000
2930 C2(I)=MOD(C2(I)+1,2)
2940 PRINT AT(A(I),B(I));
2950 IF C2(I)=1THEN PRINT HEX(A0CCCCFFCCCCA0);
   : ELSE PRINT HEX(A0F3CCFFCCF3A0);
2960 GOTO 3000
2970 C2(I)=MOD(C2(I)+1,4)
2980 PRINT AT(A(I),B(I));
2990 IF C2(I)=3OR C2(I)=1THEN PRINT HEX(A0DDCCFFCCEEA0);
   : ELSE IF C2(I)=2THEN PRINT HEX(A0D7E4FFD8EBA0);
   : ELSE PRINT HEX(A0F5C6FFC9FAA0);
3000 NEXT I
3010 RETURN
3020 REM  IF HIT INITIALIZE DYING MARTIAN
3030 IF M>B(I)AND M<B(I)+6THEN 3040
   : ELSE RETURN
3040 B1(I)=B(I)
   : C2(I)=3
   : IF S$="Y"THEN PRINT HEX(07);
3050 B(I)=-1
3060 N=-2
3070 RETURN CLEAR
   : GOTO 3000
3080 REM  REMOVE MARTIAN FROM SCREEN
3090 PRINT AT(A(I),B(I),7);
3100 B(I)=0
3110 GOTO 3000
3120 REM **************************************************
   : REM ******** INITIALIZE MARTIAN MISSILES *************
   : REM **************************************************
3130 J=1
3140 IF D(J)=0THEN 3170
3150 IF J=5THEN RETURN
3160 J=J+1
   : GOTO 3140
3170 IF N<>A(I)+1THEN 3190
3180 IF M=B(I)+3THEN RETURN
3190 D(J)=A(I)+1
3200 E(J)=B(I)+3
3210 PRINT AT(D(J),E(J));HEX(FF);
3220 RETURN
3230 REM **************************************************
   : REM ******** MOVE MARTIAN MISSILES *******************
   : REM **************************************************
3240 FOR I=1TO 5
3250 IF D(I)>0THEN 3260
   : PRINT AT(1,64);"M";
   : GOTO 3630
3260 F(I)=F(I)*(-1)
3270 IF F(I)<>-1THEN 3280
   : PRINT AT(1,64);"M";
   : GOTO 3630
3280 PRINT AT(D(I),E(I),1);
3290 D(I)=D(I)+1
3300 IF D(I)=NTHEN 3700
3310 IF D(I)=20AND C=0THEN 3650
3320 IF D(I)=21THEN 3360
3330 IF D(I)=24THEN 3620
3340 PRINT AT(D(I),E(I));HEX(FF);
3350 GOTO 3630
3360 J=E(I)
   : C1=0
3370 IF M(J)=2OR M(J)=3OR M(J)=0THEN 3340
3380 J=J-1
3390 IF M(J)=3THEN 3430
3400 IF M(J)=1THEN C1=1
3410 M(J)=0
3420 GOTO 3380
3430 M(J)=2
   : T=J
3440 J=J+1
3450 IF M(J)=2THEN 3490
3460 IF M(J)=1THEN C1=1
3470 M(J)=0
3480 GOTO 3440
3490 IF C1=0THEN 3610
3500 M1=M1-1
3510 K=1
3520 IF P(K)=T+2THEN 3540
3530 K=K+1
   : GOTO 3520
3540 P(K)=0
3550 L=L+1
3560 IF C1=1THEN PRINT AT(2,74);
   : PRINTUSING "###",M1;
3570 K=1
3580 IF H1(K)>-1THEN 3600
3590 H1(K)=3
   : H(K)=T
   : GOTO 3610
3600 K=K+1
   : GOTO 3580
3610 IF M1=0THEN 5050
3620 D(I)=0
3630 NEXT I
3640 RETURN
3650 IF E(I)>=Y+1AND E(I)<=Y+5THEN 3660
   : ELSE GOTO 3340
3660 IF S$="Y"THEN PRINT HEX(07);
3670 Y1=Y
   : Y=0
3680 C=50
3690 GOTO 3620
3700 IF M<>E(I)THEN 3310
3710 D1(I)=D(I)
   : D(I)=-1
3720 IF S$="Y"THEN PRINT HEX(07);
3730 D2(I)=2
3740 N=-2
3750 GOTO 3630
3760 REM **************************************************
   : REM ******** EXPLODING MARTIANS **********************
   : REM **************************************************
3770 FOR I=1TO 4
3780 IF B(I)>=0THEN 3830
3790 IF C2(I)=-1THEN 3830
3800 IF C2(I)=3THEN PRINT AT(A(I),B1(I));HEX(0ECCE1C6D6CDE1E40F);
   : ELSE IF C2(I)=2THEN PRINT AT(A(I),B1(I));HEX(0EC8E2C8D0C8C2D00F);
   : ELSE IF C2(I)=1THEN PRINT AT(A(I),B1(I));;HEX(0ED0C2A0A0D0A0C10F);
   : ELSE PRINT AT(A(I),B1(I),7);
3810 IF C2(I)<>0THEN 3820
   : B1(I),B(I)=0
3820 C2(I)=C2(I)-1
3830 NEXT I
3840 RETURN
3850 REM **************************************************
   : REM ******** EXPLODING HUMANS ************************
   : REM **************************************************
3860 IF L=0THEN RETURN
3870 FOR I=1TO 4
3880 H1(I)=H1(I)-1
3890 IF H1(I)>-1THEN 3900
   : IF H1(I)<>-1THEN 3910
   : L=L-1
   : GOTO 3910
3900 IF H1(I)=3THEN GOSUB '23(H(I))
   : ELSE IF H1(I)=2THEN GOSUB '22(H(I))
   : ELSE IF H1(I)=1THEN GOSUB '21(H(I))
   : ELSE GOSUB '20(H(I))
3910 NEXT I
3920 RETURN
3930 REM HUMAN DYING MOVEMENTS
3940 DEFFN'23(Z)
3950 PRINT AT(21,Z);HEX(0EA0E0E0D00F);
3960 PRINT AT(22,Z);HEX(0ED2C4DDE0C40F);
3970 PRINT AT(23,Z);HEX(0EA0D8FAD00F);
3980 RETURN
3990 DEFFN'22(Z)
4000 PRINT AT(21,Z,5);
4010 PRINT AT(22,Z);HEX(0EA0C4A0D0A00F);
4020 PRINT AT(23,Z);HEX(0EE8E2ECD2C40F);
4030 RETURN
4040 DEFFN'21(Z)
4050 PRINT AT(22,Z,5)
4060 PRINT AT(23,Z);HEX(0ED0E0E8E0A00F);
4070 RETURN
4080 DEFFN'20(Z)
4090 PRINT AT(23,Z,5);
4100 RETURN
4110 REM **************************************************
   : REM ******** EXPLODING MISSILES **********************
   : REM **************************************************
4120 FOR I=1TO 5
   : IF D(I)>=0THEN 4160
4130 IF D2(I)=2THEN PRINT AT(D1(I),E(I));HEX(0EE60F);
   : ELSE IF D2(I)=1THEN PRINT AT(D1(I),E(I));HEX(0ED00F);
   : ELSE PRINT AT(D1(I),E(I),1);
4140 IF D2(I)<>0THEN 4150
   : D(I)=0
4150 D2(I)=D2(I)-1
4160 NEXT I
4170 RETURN
4180 REM **************************************************
   : REM ******** EXPLODING MISSILE LAUNCHER **************
   : REM **************************************************
4190 IF C<40THEN RETURN
4200 IF C=50THEN 4210
   : ELSE IF C=49THEN 4220
   : ELSE IF C=48THEN 4230
   : ELSE IF C=47THEN 4240
   : ELSE IF C=46THEN 4250
   : ELSE IF C=45THEN 4260
   : ELSE IF C=44THEN 4270
   : ELSE IF C=43THEN 4280
   : ELSE IF C=42THEN 4290
   : ELSE IF C=41THEN 4300
   : ELSE GOTO 4310
4210 PRINT AT(19,Y1);HEX(0EA0A0A0F00F);
   : PRINT AT(20,Y1);HEX(0EA0E0F8FFF4D0A00F);
   : RETURN
4220 PRINT AT(19,Y1);HEX(0EA0A0C8F2C40F);
   : PRINT AT(20,Y1);HEX(0EA0A0F0FFF0A00F);
   : RETURN
4230 PRINT AT(19,Y1);HEX(0EA0C2C6D0D90F);
   : PRINT AT(20,Y1);HEX(0EA0A0E0FFD0A00F);
   : RETURN
4240 PRINT AT(18,Y1);HEX(0EA0A0E0C8D00F);
   : PRINT AT(19,Y1);HEX(0EA0E0CCC8C8D00F);
   : PRINT AT(20,Y1);HEX(0EA0A0A0FFA0A00F);
   : RETURN
4250 PRINT AT(18,Y1);HEX(0EA0A0E0A0D00F);
   : PRINT AT(19,Y1);HEX(0EA0C8C9C8C4C40F);
   : PRINT AT(20,Y1);HEX(0EA0C1A0CFA0C1A00F);
   : RETURN
4260 PRINT AT(19,Y1);HEX(0EC8C2C8A0C6C80F);
   : PRINT AT(20,Y1);HEX(0EA0C4A0C3A0C4A00F);
   : RETURN
4270 PRINT AT(18,Y1,7);
   : PRINT AT(19,Y1);HEX(0EA0C8E0E0C8D00F);
   : PRINT AT(20,Y1);HEX(0EC2F2A0A0E2C80F);
   : RETURN
4280 PRINT AT(19,Y1);HEX(0EE0A0D0A0E0E0A00F);
   : PRINT AT(20,Y1);HEX(0EA0C4C2A0A0C1D10F);
   : RETURN
4290 PRINT AT(19,Y1,7);
   : PRINT AT(20,Y1);HEX(0EC4D8A0A0A0C8F00F);
   : RETURN
4300 PRINT AT(20,Y1);HEX(0EE0A0A0A0A0A0D00F);
   : RETURN
4310 PRINT AT(19,Y1,7);AT(20,Y1,7);
   : RETURN
4320 REM **************************************************
   : REM ******** EARTH WINS ******************************
   : REM **************************************************
4330 REM CLEAR SCREEN OF ANY EXPLODING MARTIANS, HUMANS, MISSILES OR USER LAUN
     CHER
   : GOSUB 3860
   : GOSUB 3770
   : GOSUB 4110
   : GOSUB 4180
   : GOSUB 3860
   : GOSUB 3770
   : GOSUB 4110
   : GOSUB 4180
   : GOSUB 3860
   : GOSUB 3770
   : GOSUB 4110
   : GOSUB 4180
   : GOSUB 3860
   : GOSUB 3770
   : GOSUB 4110
   : GOSUB 4180
   : GOSUB 3860
   : GOSUB 3770
   : GOSUB 4110
   : GOSUB 4180
   : GOSUB 4180
   : GOSUB 4180
   : GOSUB 4180
4340 PRINT AT(20,Y,7);
4350 J9=1
4360 PRINT HEX(020404040E);
4370 PRINT AT(4,30);"CONGRATULATIONS";
4380 PRINT AT(5,20);"YOU HAVE SAVED EARTH FROM THE MARTIAN ATTACK!!";
4390 PRINT AT(7,20);"AND THE PEOPLE OF THE EARTH ARE JUMPING FOR JOY!!";
4400 PRINT AT(9,20);"HIT 'RETURN' TO PLAY AGAIN";HEX(0F);
4410 J=0
4420 FOR I=1TO 79
4430 IF M(I)<>3THEN 4460
4440 J=J+1
4450 Y(J)=I
4460 NEXT I
4470 KEYIN K$,4470,4471
4471 IF K$<>HEX(7E)AND K$<>HEX(7F)THEN 4480
   : LOAD RUN
4480 IF K$=HEX(0D)THEN 240
4490 I=INT(RND(1)*20)
   : I=MOD(I,J)+1
4500 GOSUB '100(Y(I))
4510 GOSUB '101(Y(I))
4520 GOSUB '102(Y(I))
4530 GOSUB '103(Y(I))
4540 GOSUB '104(Y(I))
4550 GOSUB '105(Y(I))
4560 GOSUB '106(Y(I))
4570 GOSUB '105(Y(I))
4580 GOSUB '104(Y(I))
4590 GOSUB '103(Y(I))
4600 GOSUB '102(Y(I))
4610 GOSUB '101(Y(I))
4620 GOSUB '100(Y(I))
4630 IF S$="Y"THEN PRINT HEX(07);
4640 GOTO 4470
4650 DEFFN'101(Y)
4660 PRINT AT(20,Y,5);
4670 PRINT AT(21,Y);HEX(A0F0FFF0A0);
4680 PRINT AT(22,Y);HEX(C8C1FFC2C4);
4690 PRINT AT(23,Y);HEX(A0CCC3CCA0);
4700 RETURN
4710 DEFFN'102(Y)
4720 PRINT AT(20,Y);HEX(A0A0F0A0A0);
4730 PRINT AT(21,Y);HEX(D8CCFFCCE4);
4740 PRINT AT(22,Y);HEX(A0E0CFD0A0);
4750 PRINT AT(23,Y);HEX(A0C3A0C3A0);
4760 RETURN
4770 DEFFN'103(Y)
4780 PRINT AT(20,Y);HEX(A0A0FCA0A0);
4790 PRINT AT(21,Y);HEX(C3C3FFC3C3);
4800 PRINT AT(22,Y);HEX(E0D8C3E4D0);
4810 PRINT AT(23,Y,5);
4820 RETURN
4830 DEFFN'104(Y)
4840 PRINT AT(19,Y,5);
4850 PRINT AT(20,Y);HEX(E4F0FFF0D8);
4860 PRINT AT(21,Y);HEX(A0E0FFD0A0);
4870 PRINT AT(22,Y);HEX(C2C1A0C2C1);
4880 RETURN
4890 DEFFN'105(Y)
4900 PRINT AT(19,Y);HEX(E0A0F0A0D0);
4910 PRINT AT(20,Y);HEX(C2CCFFCCC1);
4920 PRINT AT(21,Y);HEX(C9CCCFCCC6);
4930 PRINT AT(22,Y,5);
4940 RETURN
4950 DEFFN'106(Y)
4960 PRINT AT(19,Y);HEX(A0D4FCE8A0);
4970 PRINT AT(20,Y);HEX(E0C3FFC3D0);
4980 PRINT AT(21,Y);HEX(C2C3C3C3C1);
4990 RETURN
5000 DEFFN'100(Y)
5010 PRINT AT(21,Y);HEX(A0A0FCA0A0);
5020 PRINT AT(22,Y);HEX(A0D7FFEBA0);
5030 PRINT AT(23,Y);HEX(A0E0FFD0A0);
5040 RETURN
5050 REM **************************************************
   : REM ******** MARTIANS WIN ****************************
   : REM **************************************************
5060 REM CLEAR SCREEN OF ANY EXPLODING MARTIANS, HUMANS, MISSILES OR USER LAUN
     CHER
   : GOSUB 3860
   : GOSUB 3770
   : GOSUB 4110
   : GOSUB 4180
   : GOSUB 3860
   : GOSUB 3770
   : GOSUB 4110
   : GOSUB 4180
   : GOSUB 3860
   : GOSUB 3770
   : GOSUB 4110
   : GOSUB 4180
   : GOSUB 3860
   : GOSUB 3770
   : GOSUB 4110
   : GOSUB 4180
   : GOSUB 3860
   : GOSUB 3770
   : GOSUB 4110
   : GOSUB 4180
   : GOSUB 4180
   : GOSUB 4180
   : GOSUB 4180
5070 J9=1
5080 KEYIN K$,5080,5081
5081 IF K$<>HEX(7E)AND K$<>HEX(7F)THEN 5090
   : LOAD RUN
5090 IF K$=HEX(0D)THEN 240
5100 X=INT(RND(1)*23)
5110 Y=INT(RND(1)*76)
5120 Q1=INT(RND(1)*6)
   : PRINT AT(X,Y);
5130 IF Q1=0THEN PRINT HEX(DDCCFFCCEE);
   : IF Q1=1THEN PRINT HEX(DDF3FFF3EE);
   : IF Q1=2THEN PRINT HEX(CCCCFFCCCC);
   : IF Q1=3THEN PRINT HEX(D5C3FFC3EA);
5140 IF Q1=4THEN PRINT HEX(D7E4FFD8EB);
   : IF Q1=5THEN PRINT HEX(F5C6FFC9FA);
5150 PRINT HEX(020400020E);
5160 PRINT AT(4,30);"SORRY CHUMP";
5170 PRINT AT(5,10);"THE MARTIANS HAVE SUCCESSFULLY DESTROYED ALL LIFE ON EART
     H!";
5180 PRINT AT(8,20);"HIT 'RETURN' TO PLAY AGAIN";HEX(0F06);
5190 GOTO 5080
9000 DEFFN'126
9010 DEFFN'127
9030 LOAD RUN