0GOTO 55000 ' WORMCITY.109 10/4/82 T.W.PERKINS
1 ' EDOT4 8/24/82 EAT DOT #4 (CIRCLE)
2 ' ADDED COLOR # DETECTION LOGIC, SOUND
5 ' MODIFIED FROM IBM DEMO. BY TWP
10 GOTO 88
20 XA(H)=X:YA(H)=Y
30 X=X+XD(DR):Y=Y+YD(DR):ON (POINT (X,Y)+2) GOTO 40,50,60,70,80
40 STOP 'ERROR!!
50 PSET(X,Y):PRESET (XA(T),YA(T)):H=H+1:T=T+1:IF H>20 THEN H = 1
55 IF T>20 THEN T=1:GOTO 20 ELSE 20
60 GOSUB 45000:IF AUTOM =1 THEN RUN 61050 ELSE 57000
70 GOTO 60
80 PRESET (X,Y): PRESET (XA(T),YA(T)):DR=INT(RND*8)+1:T=T+1:IF T>20 THEN T=1
85 IF NOISE = 0 THEN 30 ELSE PLAY "mbl14o3n"+STR$(INT(RND*50)):GOTO 30
87 '
88 KEY OFF:SCREEN 1:DEF SEG=&HB800
89 '
90 DEF FNTM(X$)=VAL(MID$(X$,4,2))*60+VAL(RIGHT$(X$,2))
95 CLS:DEFINT B-Z :NOISE =0
100 DEF FNTM(X$)=VAL(MID$(X$,4,2))*60+VAL(RIGHT$(X$,2))
105 X=0:Y=0:DR=1:H=0:T=0
110 DEF FNXY(A,B)=A*2+1+B*80
115 COLOR 0,1
120 DIM YD(8),XD(8) ' X&Y DIR. INCRS
125 DIM XA(200),YA(200) ' X,Y VALUES
130 RANDOMIZE FNTM(TIME$)'ON INT(RND*2)+1 GOTO 135,145
132 GOTO 500
150 FOR I=1 TO 8:READ XD(I):NEXT I
155 FOR I=1 TO 8:READ YD(I):NEXT I
160 H=1:J=2
165 ' X=RND*315:Y=RND*184:IF POINT(X,Y)=0 THEN PSET (X,Y) ELSE 165
170 'PT=PT+1:IF PT<601 THEN 165
175 H=1
180 T=2:DR=INT(RND*8)+1
182 X=159:Y=99:PRESET (X,Y):GOTO 20
185 X=(RND*30)+140
190 Y=(RND*15)+90
195 IF POINT(X,Y)>0 THEN 185
200 TIME=FNTM(TIME$)+30: IF TIME>3600 THEN TIME=30
205 GOTO 55
210 DATA 0,1,1,1,0,-1,-1,-1:' x incrs
215 DATA -1,-1,0,1,1,1,0,-1:' y incrs
220 REM
500 LINE (0,0)-(319,189),2,B
510 ' FOR N = 3 TO 196 :LINE (3,N)-(316,N):NEXT N
520 ' FOR N = 2 TO 317 :LINE (N,0)-(N,199):NEXT N
530 CIRCLE (147,99),80:PAINT (149,99),3
535 CIRCLE (171,99),80:PAINT (234,99),3
537 LINE (150,50)-(175,10)
538 LINE (149,50)-(174,10)
539 LINE (148,50)-(173,10)
540 LOCATE 25,6:PRINT "USE ARROWS TO GUIDE THE WORM.";
550 GOTO 150
19999 '
20000 ' EDOT4M 9/4/82 DOT #4M NO EATING
20010 ' ADDED COLOR # DETECTION LOGIC, SOUND
20020 ' MODIFIED FROM IBM DEMO. BY TWP
20040 XA(H)=X:YA(H)=Y
20050 X=X+XD(DR):Y=Y+YD(DR):ON (POINT (X,Y)+2) GOTO 20060,20070,20090,20097,20110
20060 GOSUB 45000: IF AUTOM=1 THEN RUN 61000 ELSE 57000 'MAZE EXIT
20070 PSET(X,Y):PRESET (XA(T),YA(T)):H=H+1:T=T+1:IF H>20 THEN H = 1
20075 G=G+1:IF G20 THEN T=1:GOTO 20040 ELSE 20040
20090 IF SATURN = 0 THEN GOTO 20110 ELSE SATURNF=SATURNF-1
20095 IF SATURNF>0 THEN 20100
20097 GOSUB 45000: IF AUTOM=1 THEN RUN 61100 ELSE 57000
20100 LOCATE 25,35:PRINT SATURNF;
20110 PRESET (XA(T),YA(T)):DR=INT(RND*8)+1:X=XA(H):Y=YA(H):T=T+1:IF T>20 THEN T=1
20120 IF NOISE = 0 THEN 20050 ELSE PLAY "mbl14o3n"+STR$(INT(RND*50)):GOTO 20050
20130 '
20140 DEF SEG=&HB800 'ENTRY POINT
20150 '
20160 DEF FNTM(X$)=VAL(MID$(X$,4,2))*60+VAL(RIGHT$(X$,2))
20170 DEFINT B-R:DEFINT T-Z :NOISE =0:L=10
20180 DEF FNTM(X$)=VAL(MID$(X$,4,2))*60+VAL(RIGHT$(X$,2))
20190 X=0:Y=0:DR=1:H=0:T=0
20200 DEF FNXY(A,B)=A*2+1+B*80
20210 'COLOR 0,1
20220 DIM YD(8),XD(8) ' X&Y DIR. INCRS
20230 DIM XA(200),YA(200) ' X,Y VALUES
20240 RANDOMIZE FNTM(TIME$)'ON INT(RND*2)+1 GOTO 135,145
20260 FOR I=1 TO 8:READ XD(I):NEXT I
20270 FOR I=1 TO 8:READ YD(I):NEXT I
20280 H=1:J=2
20290 ' X=RND*315:Y=RND*184:IF POINT(X,Y)=0 THEN PSET (X,Y) ELSE 165
20300 'PT=PT+1:IF PT<601 THEN 165
20310 H=1
20320 T=2:DR=INT(RND*8)+1
20325 IF SATURN =1 THEN X=159:Y=180:PRESET (X,Y):GOTO 20040
20330 X=159:Y=99:PRESET (X,Y):GOTO 20040
20340 X=(RND*30)+140
20350 Y=(RND*15)+90
20360 IF POINT(X,Y)>0 THEN 20340
20370 TIME=FNTM(TIME$)+30: IF TIME>3600 THEN TIME=30
20380 GOTO 20080
20390 DATA 0,1,1,1,0,-1,-1,-1:' x incrs
20400 DATA -1,-1,0,1,1,1,0,-1:' y incrs
25000 DR=1:RETURN 'UP
25010 DR=7:RETURN'LEFT
25020 DR=3:RETURN'RIGHT
25030 DR=5:RETURN'DOWN
29999 '
30000 ' MAZE - Taken from the DG version of the same name
30010 ' Will Fastie - 16 Jan 82 MODIFIED FOR IBM GRAPHICS T.PERKINS 9/82
30020 KEY OFF: CLS
30030 'PROG$= "MAZE02 17 AUG 82"
30040 'PRINT PROG$: PRINT
30050 'PRINT "Where should the MAZE output go?"
30060 PRINT
30070 'PRINT " 1 - Display
30080 'PRINT " 2 - Printer"
30090 PRINT
30100 'INPUT" Enter selection: ",AN
30110 AN=1 : IF 1 > AN OR AN > 2 THEN 30100
30120 PRINT
30130 'INPUT "Enter dimensions, height and width (10 X 13 MAX.): ",V,H
30135 V=10:H=13
30140 IF 2>H OR H>23 OR 2>V OR V>23 THEN 30130
30150 'RV=RV+VAL(MID$(DATE$,3,2))
30153 'LOCATE 12,12:PRINT "PLEASE PRESS ANY KEY"
30155 'RV=RV+1:K$=INKEY$:IF K$ =""GOTO 30155
30160 'RANDOMIZE(RV)
30170 IF AN=1 THEN OPEN "scrn:" FOR OUTPUT AS 1
30180 IF AN=2 THEN OPEN "lpt1:" FOR OUTPUT AS 1
30190 DIM W(26,26), V(26,26)
30200 CLS :SCREEN 1,0
30210 LOCATE 12,11: PRINT "CALCULATING MAZE"
30220 Q=0
30230 Z=0
30240 X=INT(RND*H+1):XX=X:GOTO 30290
30250 CLS:LINE (0,0)-(((XX*24)+8),8),,BF
30260 LINE (((XX*24)+24),0)-(((H*24)+8),8),,BF
30270 LOCATE 25,3: PRINT "ARROWS GUIDE WORM. F1 ENDS EARLY";
30280 RETURN
30290 C=1
30300 W(X,1)=C
30310 C=C+1
30320 R=X
30330 S=1
30340 GOTO 30450
30350 IF R<>H THEN 30430
30360 IF S<>V THEN 30400
30370 R=1
30380 S=1
30390 GOTO 30440
30400 R=1
30410 S=S+1
30420 GOTO 30440
30430 R=R+1
30440 IF W(R,S)=0 THEN 30350
30450 IF R-1=0 THEN 30900
30460 IF W(R-1,S)<>0 THEN 30900
30470 IF S-1=0 THEN 30670
30480 IF W(R,S-1)<>0 THEN 30670
30490 IF R=H THEN 30550
30500 IF W(R+1,S)<>0 THEN 30550
30510 X=INT(RND*3+1)
30520 IF X=1 THEN 31330
30530 IF X=2 THEN 31400
30540 IF X=3 THEN 31470
30550 IF S<>V THEN 30590
30560 IF Z=1 THEN 30640
30570 Q=1
30580 GOTO 30600
30590 IF W(R,S+1)<>0 THEN 30640
30600 X=INT(RND*3+1)
30610 IF X=1 THEN 31330
30620 IF X=2 THEN 31400
30630 IF X=3 THEN 31560
30640 X=INT(RND*2+1)
30650 IF X=1 THEN 31330
30660 IF X=2 THEN 31400
30670 IF R=H THEN 30810
30680 IF W(R+1,S)<>0 THEN 30810
30690 IF S<>V THEN 30730
30700 IF Z=1 THEN 30780
30710 Q=1
30720 GOTO 30740
30730 IF W(R,S+1)<>0 THEN 30780
30740 X=INT(RND*3+1)
30750 IF X=1 THEN 31330
30760 IF X=2 THEN 31470
30770 IF X=3 THEN 31560
30780 X=INT(RND*2+1)
30790 IF X=1 THEN 31330
30800 IF X=2 THEN 31470
30810 IF S<>V THEN 30850
30820 IF Z=1 THEN 30890
30830 Q=1
30840 GOTO 30860
30850 IF W(R,S+1)<>0 THEN 30890
30860 X=INT(RND*2+1)
30870 IF X=1 THEN 31330
30880 IF X=2 THEN 31560
30890 GOTO 31330
30900 IF S-1=0 THEN 31150
30910 IF W(R,S-1)<>0 THEN 31150
30920 IF R=H THEN 31060
30930 IF W(R+1,S)<>0 THEN 31060
30940 IF S<>V THEN 30980
30950 IF Z=1 THEN 31030
30960 Q=1
30970 GOTO 30990
30980 IF W(R,S+1)<>0 THEN 31030
30990 X=INT(RND*3+1)
31000 IF X=1 THEN 31400
31010 IF X=2 THEN 31470
31020 IF X=3 THEN 31560
31030 X=INT(RND*2+1)
31040 IF X=1 THEN 31400
31050 IF X=2 THEN 31470
31060 IF S<>V THEN 31100
31070 IF Z=1 THEN 31140
31080 Q=1
31090 GOTO 31110
31100 IF W(R,S+1)<>0 THEN 31140
31110 X=INT(RND*2+1)
31120 IF X=1 THEN 31400
31130 IF X=2 THEN 31560
31140 GOTO 31400
31150 IF R=H THEN 31260
31160 IF W(R+1,S)<>0 THEN 31260
31170 IF S<>V THEN 31210
31180 IF Z=1 THEN 31250
31190 Q=1
31200 GOTO 31410
31210 IF W(R,S+1)<>0 THEN 31250
31220 X=INT(RND*2+1)
31230 IF X=1 THEN 31470
31240 IF X=2 THEN 31560
31250 GOTO 31470
31260 IF S<>V THEN 31300
31270 IF Z=1 THEN 31320
31280 Q=1
31290 GOTO 31310
31300 IF W(R,S+1)<>0 THEN 31320
31310 GOTO 31560
31320 GOTO 31760
31330 W(R-1,S)=C
31340 C=C+1
31350 V(R-1,S)=2
31360 R=R-1
31370 IF C=H*V+1 THEN 31770
31380 Q=0
31390 GOTO 30450
31400 W(R,S-1)=C
31410 C=C+1
31420 V(R,S-1)=1
31430 S=S-1
31440 IF C=H*V+1 THEN 31770
31450 Q=0
31460 GOTO 30450
31470 W(R+1,S)=C
31480 C=C+1
31490 IF V(R,S)=0 THEN 31520
31500 V(R,S)=3
31510 GOTO 31530
31520 V(R,S)=2
31530 R=R+1
31540 IF C=H*V+1 THEN 31770
31550 GOTO 30900
31560 IF Q=1 THEN 31660
31570 W(R,S+1)=C
31580 C=C+1
31590 IF V(R,S)=0 THEN 31620
31600 V(R,S)=3
31610 GOTO 31630
31620 V(R,S)=1
31630 S=S+1
31640 IF C=H*V+1 THEN 31770
31650 GOTO 30450
31660 Z=1
31670 IF V(R,S)=0 THEN 31710
31680 V(R,S)=3
31690 Q=0
31700 GOTO 31760
31710 V(R,S)=1
31720 Q=0
31730 R=1
31740 S=1
31750 GOTO 30440
31760 GOTO 30350
31770 GOSUB 30250
31780 VY = 0
31790 FOR J = 1 TO V: VY = VY + 9
31800 HX =0
31810 LINE (HX,VY)-((HX+8),(VY+9)),,BF:HX=-16
31820 FOR I = 1 TO H: HX = HX +24
31830 IF V(I,J)<2 THEN 31850
31840 GOTO 31860
31850 LINE ((HX+16),(VY+0))-((HX+24),(VY+8)),,BF
31860 NEXT I
31870 VY=VY+9
31880 HX =-24
31890 FOR I = 1 TO H: HX=HX+24
31900 IF V(I,J)=0 THEN 31940
31910 IF V(I,J)=2 THEN 31940
31920 LINE (HX,VY)-((HX+8),(VY+8)),,BF
31930 GOTO 31950
31940 LINE (HX,VY)-((HX+24),(VY+8)),,BF
31950 NEXT I
31960 LINE ((HX+24),VY)-((HX+32),(VY+8)),,BF
31970 NEXT J
31980 CLOSE
31985 GOTO 20140
31990 'GOTO 2010
32000 'GOTO 3000
32010 K$=INKEY$:IF K$=""GOTO 32010
32020 GOTO 57000
39999 '
40000 ' SATURN FROM IBM DEMO 8/23/82
40010 KEY OFF:DEFSNG S,A:SCREEN 1,0:COLOR 0,0:CLS:X=160:Y=100
40020 FOR T=1 TO 500:CIRCLE(RND*300,RND*300),RND*.5,3:NEXT T
40030 CIRCLE (X,Y),50,1
40040 PAINT (X,Y),3,1
40042 CIRCLE (X,Y),4,1
40044 PAINT (X,Y),2,1
40046 LINE (X,Y)-(X,(Y-60)),0
40050 FIRST =0:LAST=10:CLR=1:SET = 2.2:ANG =1:GOSUB 40090
40060 FIRST=14:LAST=22:CLR=2:SET=2.05:ANG=1.1:GOSUB 40090
40070 FIRST=31:LAST=48:CLR=1:SET=1.95:ANG=1.2:GOSUB 40090
40080 GOTO 40130
40090 FOR RING=FIRST TO LAST
40100 CIRCLE(X,Y),85+RING,CLR,SET,ANG,.2
40110 NEXT RING
40120 RETURN
40130 'FOR I=1 TO 3000:NEXT:DEFINT S,A
40140 LINE (0,0)-(319,188),,B
40142 COLOR 0,1
40145 LOCATE 25,2:PRINT "TYPE M IF USING BLACK/WHITE MONITOR";
40150 N=N+1:IF N > 900 THEN 40170
40155 K$=INKEY$:IF K$ = "" THEN 40150
40160 IF K$="M" THEN COLOR 0,1:GOTO 40180
40165 IF K$="m" THEN COLOR 0,1:GOTO 40180
40170 COLOR 0,0
40180 SATURNF =50 'THIS VALUE CHANGES TIME OF DISPLAY.
40190 LOCATE 25,2:PRINT " ARROWS HELP WORM. SHIELD LEFT:"; SATURNF;
40200 SATURN = 1:GOTO 20140
44999 '
45000 'COLOR/SOUND EXPLOSION FOR ENDINGS
45010 FOR BACKGROUND =1 TO 15:IF NOISE=1 THEN SOUND 130,20
45020 FOR N=1 TO 130:NEXT:COLOR BACKGROUND,0:IF NOISE=1 THEN SOUND 90,15
45030 FOR N=1 TO 210:NEXT:COLOR BACKGROUND,1
45040 NEXT
45050 FOR N = 1 TO 600:NEXT:RETURN
54999 '
55000 'TWP LOGO BUILDER 7/12/82 MODIFIED IBM DEMO.
55010 KEY OFF
55020 DIM A$(15),P$(15):SCREEN 0,1:WIDTH 40:COLOR 15,1,1:LOCATE ,,0
55030 GREEN=2: BLUE=1: CYAN=3: YELLOW=6 ELSE GREEN=7: BLUE=0: CYAN=7: YELLOW=7
55040 A$(13)= " Theodore William Perkins"
55050 A$(1)=SPACE$(39):A$(2)=A$(1):A$(11)=A$(1):A$(12)=A$(1):A$(14)=A$(1):A$(15)=A$(1)
55060 A$(1)= " A COLLECTION BY "
55070 A$(3)="88888888 88 8 88 888888 "
55080 A$(4)="88888888 888 8 888 8888888"
55090 A$(5)="8 88 8 88 888 88 88 88"
55100 A$(6)=" 88 888888888 888888"
55110 A$(7)=" 88 8888 8888 88888 "
55120 A$(8)=" 88 888 888 88 "
55130 A$(9)=" 8888 888 888 8888 "
55140 A$(10)=" 8888 888 888 8888 "
55150 CLS
55160 FOR I = 2 TO 40
55170 FOR J = 3 TO 10
55180 LOCATE J+5,I:PRINT "?";
55190 NEXT J:SOUND 100+RND*3000,1:NEXT I
55200 FOR I = 1 TO 5
55210 FOR J = 3 TO 10
55220 LOCATE J+5,I:PRINT " ";
55230 NEXT J:SOUND 100+RND*3000,1:NEXT I
55240 FOR I=6 TO 35:FOR J=3 TO 10:IF MID$(A$(J),I-5,1)=" "THEN LOCATE J+5,I:PRINT " ";
55250 NEXT J:SOUND 100+RND*3000,1:NEXT I
55260 FOR I = 36 TO 40
55270 FOR J = 3 TO 10
55280 LOCATE J+5,I:PRINT " ";
55290 NEXT J:SOUND 100+RND*3000,1:NEXT I
55300 COLOR 15,BLUE:LOCATE 1+5,6: PRINT SPACE$(3)+A$(1)+SPACE$(3)
55310 SOUND 100+RND*3000,1
55320 COLOR 15,BLUE:LOCATE 13+5,2: PRINT SPACE$(3)+A$(13)
55330 SOUND 100+RND*3000,4
55340 FOR I=1 TO 5000:NEXT
55350 RUN 56000
56000 WIDTH 40:CLS:SCREEN 0,0:COLOR 15,0
56030 LOCATE 3,4 :PRINT "A COLLECTION OF NONSENSE -";
56040 LOCATE 4,6 :PRINT "DONE IN THE NAME OF LEARNING,";
56050 LOCATE 5,6 :PRINT "DONATED IN THE NAME OF FUN.";
56060 LOCATE 7,4 :PRINT "ALL PROGRAMS REQUIRE BASICA AND THE";
56065 LOCATE 8,6 :PRINT "COLOR/GRAPHICS ADAPTER.";
56070 LOCATE 10,4 :PRINT "ALL PROGRAMS O.K. ON A B/W MONITOR,";
56080 LOCATE 11,6:PRINT "BUT A RGB IS THE BEST. A T.V. MAY";
56090 LOCATE 12,6:PRINT "BE MARGINAL, DEPENDING ON THE SET.";
56100 LOCATE 14,4:PRINT "MOST PROGRAMS MODIFIED FROM SOURCES";
56110 LOCATE 15,6:PRINT "THAT ARE CREDITED IN THE LISTING.";
56120 LOCATE 23,2:PRINT "6730 Ann Lee Dr. North Rose,N.Y. 14516";
56130 COLOR 31
56140 LOCATE 19,10:PRINT "PRESS ANY KEY TO START";
56160 K$ = INKEY$: IF K$ = "" THEN 56160
56200 RUN 57000
56999 '
57000 RUN 57005
57005 SCREEN 1,0:CLS:COLOR 0,1
57010 LINE (0,0)-(319,199),,B
57020 LOCATE 3,10:PRINT "WELCOME TO WORM CITY";
57030 LOCATE 5,17:PRINT "-MENU-";
57040 LOCATE 8,6 :PRINT "1 = WORM EATING APPLE";
57050 LOCATE 10,6:PRINT "2 = WORM ATTACKING SATURN";
57060 LOCATE 12,6:PRINT "3 = WORM LOST IN MAZE";
57070 LOCATE 15,6:PRINT "4 = AUTO-DISPLAY MODE";
57090 LOCATE 17,6:PRINT "5 = EXIT WORM CITY TO BASIC";
57120 LOCATE 22,2:PRINT "F1 = END SELECTION F2 = SOUND ON/OFF";
57130 GOSUB 57500
57140 GOTO 58000
57500 ON KEY(11) GOSUB 25000:KEY(11) ON
57510 ON KEY(12) GOSUB 25010:KEY(12) ON
57520 ON KEY(13) GOSUB 25020:KEY(13) ON
57530 ON KEY(14) GOSUB 25030:KEY(14) ON
57540 ON KEY(1) GOSUB 60000:KEY(1) ON
57550 ON KEY(2) GOSUB 60050:KEY(2) ON
57567 T$ = TIME$
57570 LT$= LEFT$(T$,2) :MT$ =MID$(T$,4,2):RT$= RIGHT$(T$,2)
57575 TT$ = LT$ + MT$ + RT$:TTT=INT(VAL(TT$)*.12)
57580 RANDOMIZE(TTT)
57595 RETURN
57999 '
58000 FOR N = 1 TO 25:K$ = INKEY$:NEXT
58005 K$=INKEY$:IF K$ = "" THEN 58005
58010 IF K$ ="1" THEN 1
58020 IF K$ ="2" THEN 40000
58030 IF K$ ="3" THEN 30000
58040 IF K$ ="4" THEN 61000
58080 IF K$ ="5" THEN SCREEN 0,0,0:WIDTH 80:KEY ON:STOP
58090 GOTO 58005
60000 RUN 57000
60050 IF NOISE = 0 THEN NOISE =1 :RETURN ELSE NOISE = 0:SOUND 60,0: RETURN
60999 '
61000 SCREEN 1,0:CLS:COLOR 0,1:AUTOM=1
61010 GOSUB 57500
61020 GOTO 1
61050 SCREEN 1,0:CLS:COLOR 0,1:AUTOM=1
61060 GOSUB 57500
61070 GOTO 40000
61100 SCREEN 1,0:CLS:COLOR 0,1:AUTOM=1
61110 GOSUB 57500
61120 GOTO 30000