0 IFVTHEN340
1 :
2 DIM L$(20)
10 DD$=""
15 PD$=""
17 :
18 TI$=""
20 EE$=""
30 REM * COMMODORE64 DEMO *
40 REM * *
50 REM * L.J.ANCIER & S.MURRI *
60 REM * WITH SPECIAL THANKS TO *
70 REM * F.A.BOWEN & D.C.MARTINI *
80 REM * *
90 REM *****************************
99 :
100 V=13*4096:S=V+8*256:UC=PEEK(V+24)
105 UC=21:LC=23
110 POKEV+32,0:POKEV+33,0:POKEV+16,0
115 V9=PEEK(V+17):POKEV+17,23:POKEV+23,4:POKEV+28,4
117 POKEV+29,1:POKEV+39,0
120 POKEV+37,10:POKEV+38,6:POKEV+41,7
125 POKEV+4,154:POKEV+5, 00:POKEV+21,5
126 SZ=2040
127 POKEV, 00:POKEV+1, 00:POKESZ,56
130 A1=12*16↑3 :REM SCROLL UTIL
135 SL=174:SP=2042:SS=36
136 POKESP,SS
140 A2=12*16↑3+8*16↑2 :REM BLOCK PRINT
145 SD=163:CD=169:XP=177:YP=176
150 GOSUB 20100
151 :
152 :
155 PRINT""CHR$(142):GOSUB35000: REM COUNTDOWN
157 GOSUB35200: REM INTRO MESSAGE
159 GOSUB 200 : REM COMMODORE 64
161 : REM CLYDE INTRO
162 GOSUB 292 : REM CHARACTER SET
164 GOSUB32000: REM CLOCK
166 REM : HONESTY INTRO
168 REM GOSUB45000: REM HONESTY START
170 GOSUB 350 : REM POPULAR GRAPH
172 GOSUB40000: REM FISH
174 GOSUB4200:REM GOSUB 259 : REM MENU
176 PRINT"":D=4000:GOSUB1100
178 CLR:RUN
180 :
182 :
190 DATA 71,63,0,151,103,0,119,55,107,0,39,135,100,
192 DATA 87.0,119,0,55,135,89,151,0,103,77,0,-1
200 PRINT"";:T=15:POKEV+32,0:POKEV+33,0:POKEV+21,4:F=22
201 PRINTSPC(T)""
202 PRINTSPC(T)""
203 PRINTSPC(T)""
204 PRINTSPC(T)""
205 PRINTSPC(T)""
206 PRINTSPC(T)""
207 PRINTSPC(T)""
208 PRINTSPC(T)""
209 PRINTSPC(T)""
210 PRINTSPC(10)""
212 REM GOSUB15000:REM GOTO32000
215 :
220 D$="":C$="":X=2:Y=15
221 FORI=1TO10:GOSUB1000
222 : C$=RIGHT$(C$,1)+LEFT$(C$,5)
223 : NEXT
225 :
230 D=500:GOSUB1100:POKEV+5,210+F:GOSUB20500:GOSUB20510:FORK=1TO14
231 GOSUB20520:POKESL,1:SYSA1:POKESP,SS+(KAND1):NEXT:GOSUB20530
232 GOSUB1100:I=PEEK(V+4):B=23:C=2:GOSUB1260
233 :
235 :
240 M$=""
241 LN=12:POKEV+5,127+F:A=B:C=1:GOSUB1200
245 M$=""
246 POKEV+5,143+F:A=B:LN=14:GOSUB1200
248 :
250 M$=""
251 POKEV+5,159+F:LN=16:GOSUB1200
255 M$=""
256 POKEV+5,175+F:VD=−1:LN=18:GOSUB1200
257 POKEV+21,0:POKEV+4,0:POKEV+5,0
258 RETURN
259 DIMM$(20):POKEV+21,0:GOSUB10010:GOSUB22300
260 M$(1)="" "
261 M$(2)=""
262 M$(3)=""
263 M$(4)=""
264 M$(5)=""
265 M$(6)=""
266 M$(7)=""
267 M$(8)=""
268 M$(9)=""
269 M$(10)=""
270 M$(11)=""
271 M$(12)=""
272 M$(13)=""
273 M$(14)=""
274 M$(15)=""
275 M$(16)=""
276 D=2000:GOSUB1100:PRINT""
277 FORK=1TO16:POKESL,1:SYSA1:PRINTM$(K)"":NEXT
280 GOSUB15000:IFKY=0THENRETURN
281 CM$="":GOSUB15050:IFCM=0THEN280
282 GOSUB22300:ONCMGOTO4200,4200,4400,4600,4800,5000
283 :
290 :
291 :
292 PRINT"
293 PRINT""
294 GOSUB22300:D=500:GOSUB1100:CS(0)=UC:CS(1)=LC
295 FORI=0TO1:FORJ=0TO3:FORK=0TO31
296 POKE1187+ I*320+J*80+K,I*128+J*32+K
297 POKE55459+I*320+J*80+K,3
298 GOSUB22310:NEXT:NEXT:NEXT:D=200:GOSUB1100
299 :
300 POKEV+4,64:POKEV+5,6+F:POKEV+16,4
301 POKEV+23,4:POKEV+28,4:POKEV+41,7
302 I=320:B=160:C=2:POKEV+21,4:D=20
303 VD=0:GOSUB1260:ZZ=0:FORZX=1TO4:POKESP,32:GOSUB22200
304 ZZ=1−ZZ:POKEV+24,CS(ZZ):POKESP,34
305 D=1000:GOSUB1100:NEXT
306 :
308 I=B:B=0:VD=−1:GOSUB1260:D=2000:GOSUB1100:RETURN
310 PRINT"":POKEV+24,UC
320 D$="":C$="":X=2:Y=8
321 FORI=0TO24
322 POKEV+32,INT(RND(1)*16)
323 GOSUB1000:POKEV+33,INT(RND(1)*16)
324 C$=RIGHT$(C$,1)+LEFT$(C$,5)
325 NEXT:POKEV+33,0
326 :
330 D=800:GOSUB1100:POKEV+32,0:PRINT"";:POKE198,10
335 REM FORI=1TO10:READX:POKE630+I,X:NEXT:DATA 76,73,83,84,13,67,79,78,84,13
336 STOP
340 GOSUB1100
345 :
347 :
350 RESTORE:PRINT"":POKEV+32,0:POKEV+33,0
351 READQ:IFQ<>−1THEN351
352 PRINT""
353 GOSUB15100:TM=10
355 FORI=0TO440STEP40:POKE1236+I,115:POKE55508+I,12:NEXT
356 POKE1716,109:POKE55988,12
357 FORI=0TO20:POKE1717+I,114:POKE55989+I,12:NEXT
360 Y(0)=116:Y(1)=117:Y(2)=246:Y(3)=231:Y(4)=160
365 PRINT"":FORI=0TO5:READM$,X(I),C(I):PRINT""M$:NEXT:A=1277:B=55549
366 DATAA,64,2,B,80,4,"",96,7,D,52,5,E,59,6
367 DATA F,28,14:PRINT""TAB(15)"":ZZ=9
370 K=0:L=0:FORJ=0TO5:POKEB+J*80,C(J):NEXT:FORI=0TO96:ZQ=−(I/ZZ=INT(I/ZZ))
371 FORJ=0TO5:IFI4THENK=0:L=L+1:FORJ=0TO5:POKEB+J*80+L,C(J):NEXT
373 NEXT
900 RETURN
999 :
1000 FORK=0TO5 :REM BLOCK SETUP
1010 : POKESD+K,ASC(MID$(D$,K+1,1))
1020 : POKECD+K,ASC(MID$(C$,K+1,1))−64
1030 : NEXT
1040 : POKEXP,X:POKEYP,Y:SYSA2
1050 : RETURN
1060 :
1100 FORK=1TOD:NEXT :REM DELAY
1105 GETA$:IFA$=""THEN1110
1106 GETA$:IFA$=""THEN1106
1110 : RETURN
1120 :
1200 PRINT ""LEFT$(DD$,LN)LEFT$("",A/8);:K=0:L=0:VV=15
1210 X=32:GOSUB23000:FORI=ATO340STEP8
1220 POKEV+4,IAND255:IFI>256THENPOKEV+16,4
1230 POKESP,X+L:L=(L+1)AND3
1240 IFI−A=K*8THENA$=MID$(M$,K+1,1):PRINTA$;:K=K+1:GOSUB23100
1250 ON−(A$="")GOTO1255:NEXT
1255 REM IFC<1THENRETURN
1257 REM GOSUB12000
1260 VV=15: GOSUB20200:K=C*18:L=0:X=38:POKESP,X
1270 ZZ=0:FORJ=ITOBSTEP−4:ZZ=ZZ+1:IFZZ=7THENZZ=1
1275 ONZZGOSUB20210,20230,20230,20220,20230,20230
1280 POKEV+4,JAND255:IFJ<256THENPOKEV+16,0
1285 POKESP,X+L:L=(L+1)AND3:IFJ.20):NEXT
1295 RETURN
1400 A=60:PRINT"";""C2$;:K=0:L=0:QQ=1:C=20:TM=0
1405 LM=LEN(M$):OO=0
1410 X=56:A=60:GOSUB20300:FORI=ATO340STEP8*QQ:IFI>256THENPOKEV+16,1
1420 POKEV,IAND255
1430 POKESZ,X+L:L=(L+1)AND3
1440 A$=MID$(M$,K+1,QQ):PRINTA$;:K=K+QQ:TM=1−TM:ONTM+1GOSUB20310,20320
1445 IFA$=""ORA$=""THENI=I−8:OO=OO+1
1447 REM FORJ8=1TO6:IFA$=CC$(J8)THENI=I-8:OO=OO+1:J8=6
1449 REM NEXT
1450 IF(K+1>LM)THENII=I:I=340
1455 NEXT:I=II:IFM$<>""THENGOSUB 20330
1457 :
1460 B=60:K=C*18:L=0:
1470 GOSUB20400:GOSUB20410:FORJ=ITOBSTEP−8
1480 POKEV,JAND255:IFJ<256THENPOKEV+16,0
1485 POKESZ,56 :L=(L+1)AND3:REM IFJI/2THENG$=""
1502 L$(I)=""+G$+LEFT$(PD$,32)+G$+""
1504 PRINTC1$""C2$L$(I)C1$"";:NEXT
1506 PRINTC3$""C4$""C3$"";
1510 PRINTC3$""C4$""C3$"";
1512 PRINT C3$"";
1514 PRINTC3$"";
1516 PRINT C3$"";
1520 POKEV+21,1:POKEV,60:POKEV+1,198
1530 CC$(1)="":CC$(2)="":CC$(3)="":CC$(4)="":CC$(5)=""
1550 PRINT"";:RETURN
1560 PRINT"":ZZ=1:GOTO1502
1565 PRINT "";"";:O(0)=OO:O=OO+32:IFM$=""THENO=32:O(0)=0
1570 L$(0)=""+LEFT$(""+M$+PD$,O)+"":FORI=9TO1STEP−1:L$(I)=L$(I−1)
1571 O(I)=O(I−1):NEXT
1572 L$(0)=""+LEFT$(PD$,32)+"":GOSUB20430:O(0)=0
1574 FORI=0TO8 :PRINTC1$""C2$""MID$(L$(I),3,32+O(I))""C1$"";""
1576 NEXT:RETURN
1578 PRINT "";
1580 FORI=0TO8 :PRINTC1$""C2$""MID$(L$(I),3,32)""C1$"";""
1582 NEXT:RETURN
3510 NEXT:GOTO35100
3900 POKEV+17,V9:PRINT ""LEFT$(DD$,25);
3910 FORJ=1TOLEN(M$):PRINTMID$(M$,J,1);
3912 FORT=1TO1:NEXT:NEXT:IFM$=""THENRETURN
3914 FORT=1TO3:NEXT:PRINT"";:RETURN
4000 PRINT"";CHR$(14)
4002 M$="":GOSUB3900
4003 M$="":GOSUB3900:GOSUB3900
4004 M$="":GOSUB3900:M$="":GOSUB3900
4006 M$="":GOSUB3900
4008 M$="":GOSUB3900
4010 M$="":GOSUB3900
4011 M$="":GOSUB 3900:M$="":GOSUB3900
4012 M$="":GOSUB3900
4014 M$="":GOSUB3900
4016 M$="":GOSUB 3900
4018 M$="":GOSUB 3900:M$="":GOSUB3900
4020 M$="":GOSUB 3900
4022 M$="":GOSUB 3900:M$="":GOSUB3900
4024 M$="":GOSUB 3900:M$="":GOSUB3900
4026 M$="":GOSUB3900
4028 M$="":GOSUB3900
4030 M$="":GOSUB3900
4032 M$="":GOSUB3900
4034 M$="":GOSUB3900
4036 M$="":GOSUB3900
4038 M$="":GOSUB3900
4040 M$="":GOSUB3900
4042 M$="":GOSUB 3900
4044 M$="":GOSUB3900
4046 M$="":GOSUB 3900
4048 M$="":GOSUB3900
4050 M$="
4052 M$="":GOSUB3900
4054 M$="":GOSUB3900
4056 M$="":GOSUB 3900
4058 M$="":GOSUB3900:M$="":GOSUB3900
4060 RETURN
4200 PRINT"";CHR$(14)
4202 M$="":GOSUB3900
4203 M$="":GOSUB3900:GOSUB3900
4204 M$="":GOSUB3900
4206 M$="":GOSUB3900
4208 M$="":GOSUB3900
4210 M$="":GOSUB3900
4212 M$="":GOSUB3900
4214 M$="":GOSUB3900
4216 M$="":GOSUB3900
4218 M$=""
4220 M$="":GOSUB3900
4222 M$="":GOSUB3900
4224 M$="":GOSUB 3900
4226 M$="":GOSUB3900
4228 M$="":GOSUB3900
4230 M$="":GOSUB3900
4232 M$="":GOSUB 3900
4234 M$="":GOSUB3900
4236 M$="":GOSUB3900
4238 M$="":GOSUB3900
4240 M$="":GOSUB3900
4250 M$="":GOSUB3900:GOSUB3900:GOSUB3900
4252 GOSUB3900:GOSUB15000
4253 FORX=1TO20:M$="":GOSUB3900:NEXT
4254 M$="":GOSUB3900:M$="":GOSUB3900
4256 M$="":GOSUB3900
4260 M$="":GOSUB3900
4264 M$="":GOSUB3900
4266 M$="":GOSUB3900
4267 M$="":GOSUB 3900
4268 FORX=1TO4:M$="":GOSUB3900:NEXT
4270 M$="":GOSUB3900
4272 M$="":GOSUB3900
4274 M$="":GOSUB3900
4276 M$="":GOSUB3900
4278 FORX=1TO10:M$="":GOSUB3900:NEXT
4279 GOSUB 15000:FORX=1TO23:GOSUB3900:NEXT
4280 M$="":GOSUB 3900
4282 M$="":GOSUB3900:GOSUB3900
4284 M$="":GOSUB3900:M$="":GOSUB 3900
4286 M$="":GOSUB 3900
4288 M$="":GOSUB 3900
4290 M$="":GOSUB 3900
4292 M$="":GOSUB3900
4294 M$="":GOSUB3900
4296 M$="":GOSUB3900
4298 M$="":GOSUB3900
4300 M$="":GOSUB3900
4310 M$="":GOSUB 3900
4312 M$="
4314 FORX=1TO9:M$="":GOSUB 3900:NEXT
4316 GOSUB15000
4318 :
4400 PRINT"";CHR$(14)
4402 M$="":GOSUB3900
4403 M$="":GOSUB3900:GOSUB3900
4405 M$="":GOSUB3900
4406 M$="":GOSUB3900
4408 M$="":GOSUB3900
4410 M$="":GOSUB3900
4412 M$="":GOSUB3900
4414 M$="":GOSUB 3900
4416 M$="":GOSUB3900
4418 M$="":GOSUB3900
4420 M$="":GOSUB3900:GOSUB3900
4422 M$="":GOSUB3900
4424 M$="":GOSUB3900
4426 M$="":GOSUB 3900
4428 M$="":GOSUB3900
4430 M$="":GOSUB3900
4432 M$="":GOSUB3900
4434 M$="":GOSUB3900
4436 FORX=1TO4:M$="":GOSUB3900:NEXT
4438 GOSUB15000:RETURN
4440 :
4600 PRINT"";CHR$(14)
4602 M$="":GOSUB3900
4603 M$="":GOSUB3900:GOSUB3900
4800 PRINT"";CHR$(14)
4802 M$="":GOSUB3900
4900 PRINT"";CHR$(14)
4902 M$="":GOSUB3900
4903 M$="":GOSUB3900:GOSUB3900
5000 PRINT"";CHR$(14)
5002 M$="":GOSUB3900
5003 M$="":GOSUB3900:GOSUB3900
5100 PRINT"";CHR$(14)
5102 M$="":GOSUB3900
5103 M$="":GOSUB3900:GOSUB3900
9999 POKEV+17,27:POKEV+21,0
10000 D$="":C$="":X=0:Y=16
10001 FORI=1TO10:GOSUB1000
10002 : C$=RIGHT$(C$,1)+LEFT$(C$,5)
10003 : NEXT:RETURN
10010 PRINT"":GOTO10000:D=500:GOSUB1100:REM GOSUB
10020 FORK=1TO19:POKESL,1:SYSA1:NEXT
10030 GOSUB1100:REM GOSUB STOP
10040 GOTO10000
12000 FORK=1TO1:POKESL,1:SYSA1:NEXT:RETURN
15000 XT=20:TT=20:FORXX=0TOXT:FORT=1TOTT:GETA$:KY=0:IFA$<>""THENT=TT:XX=XT:KY=−1
15005 NEXT:T$(1)="":Q=5
15010 ZZ=0:T$(0)="":Z=(XX/Q=INT(XX/Q)):IFZTHENZZ=1−ZZ
15020 PRINT""LEFT$(DD$,23)LEFT$(EE$,10)T$(ZZ):IFXX=XTTHENGOSUB15100
15030 NEXT:GOSUB15032:RETURN
15032 GOSUB22300:POKEF1+1,120:RETURN
15040 :
15050 FORCM=1TOLEN(CM$):IFA$=MID$(CM$,CM,1)THENRETURN
15060 NEXT:CM=0:RETURN
15070 :
15100 VL=10:F1=0:F2=100:AT=10:DC=10:SU=10:RE=10:WV=33:TM=150:GOTO20000:REM V1
15102 :
20000 S=13*4096+1024
20010 POKES+24,VL:POKES+5,AT*16+DC:POKES+6,SU*16+RE:POKES,F1:POKES+1,F2
20020 POKES+4,WV:FORT9=1TOTM:NEXT:POKES+4,WV−1:POKES+24,0:RETURN
20022 :
20100 VO=54296:FC=54293:RE=54295
20104 O3=54299:E3=54300
20110 W1=54276:W2=54283:W3=54290
20112 Z1=54277:Z2=54284:Z3=54291
20113 S1=54278:S2=54285:S3=54292
20114 F1=54272:F2=54279:F3=54286
20115 P1=54274:P2=54281:P3=54288
20116 FORI=F1TOVO:POKEI,0:NEXT:RETURN
20118 :
20200 REM SET-UP FOOT STEPS
20201 POKE VO,15
20202 POKE F1,220:POKE F1+1,68
20203 POKE Z1,15
20204 POKE S1,13*16+7
20205 POKE F2,120:POKE F2+1,100
20206 POKE Z2,15
20207 POKE S2,13*16+7
20209 RETURN
20210 REM LEFT FOOT
20216 POKE W1,129
20218 POKE W1,128
20219 RETURN
20220 REM RIGHT FOOT
20226 POKE W2,129
20228 POKE W2,128
20230 RETURN
20240 RETURN
20300 REM **** SETUP TELETYPE AND BELL
20301 POKE VO,15
20302 POKE Z1,33: POKE Z2,33: POKE Z3,3
20303 POKE S1,16*9+3:POKE S2,16*9+3
20304 POKE S3,16*11+10
20305 POKE P3+1,12
20306 POKE F1,220: POKE F1+1,50
20307 POKE F2,220: POKE F2+1,200
20308 POKE F3,031: POKE F3+1,163
20309 RETURN
20310 REM *** TELETYPE VOICE 1
20312 POKE W1,129
20313 FOR T=1 TO 6: NEXT T
20314 POKE W1,128
20319 RETURN
20320 REM *** TELETYPE VOICE 2
20322 POKE W2,129
20323 FOR T=1 TO 6: NEXT T
20324 POKE W2,128
20329 RETURN
20330 REM *** TELETYPE BELL
20332 POKE W3,65
20333 FOR T=1 TO 6: NEXT T
20334 POKE W3,64
20339 RETURN
20400 REM **** SETUP GLIDE AND SCROLL
20401 POKE VO,15
20402 POKE Z1,00: POKE Z2,00
20403 POKE S1,16*5:POKE S2,16*15
20405 POKE P1+1,4: POKE P2+1,4
20406 POKE F1,190: POKE F1+1,0
20407 POKE F2,108: POKE F2+1,1
20409 RETURN
20410 REM *** GLIDE ON
20412 POKE W1,65
20419 RETURN
20420 REM *** GLIDE OFF
20422 POKE W1,64
20429 RETURN
20430 REM SCROLL UP
20432 POKE W2,65
20433 FOR T=1 TO 20:NEXT T
20434 POKE W2,64
20435 FOR T=1 TO 20:NEXT T:RETURN
20436 POKE S2,16*10
20437 POKE W2,65
20438 FOR T=1 TO 20:NEXT T
20439 POKE W2,64:RETURN
20500 REM **** SETUP SCREEN PUSH
20501 REM FL=STARTING FREQUENCY (LO)
20502 REM FH=STARTING FREQUENCY (HI)
20503 REM FV=VALUE TO INCREMENT
20504 FH=2: FL=0 :FV=128
20505 POKE Z1,00:POKE VO,15
20506 POKE S1,16*15+8
20507 POKE F1,000: POKE F1+1,FH
20509 RETURN
20510 REM *** START PUSH
20512 POKE W1,17
20519 RETURN
20520 REM *** INCREMENT FREQUENCY
20521 FL=FL+FV
20522 IF FL>255 THEN FL=FL−255:FH=FH+1
20528 POKE F1,FL:POKE F1+1,FH
20529 RETURN
20530 REM *** STOP SCREEN PUSH
20531 POKE W1,16
20538 GOSUB 20600: REM ADD SOME NOISE
20539 RETURN
20600 REM *** NOISE AT END OF PUSH
20602 POKE Z2,16*11+3: POKE S2,16*13+10
20603 POKE F2,0: POKE F2+1,1
20604 POKE W2,129
20606 FOR T=1TO30:NEXT T
20608 POKE W2,128
20609 RETURN
20700 POKE VO,15
20702 POKE Z1,00: POKE Z2,00
20703 POKE S1,16*15+9
20704 POKE S2,16*15+9
20705 POKE F1,25 : POKE F1+1,5
20706 POKE F2,103: POKE F2+1,5
20709 RETURN
20710 REM **** JAWS 1
20712 POKE W1,17
20713 FORT=1TO200/(I/200+1):NEXT
20714 POKE W1,16:RETURN
20720 REM **** JAWS 2
20722 POKE W2,17
20723 FORT=1TO200/(I/200+1):NEXT
20724 POKEW2,16:FORT=1TO100:NEXT:RETURN
20800 REM **** SWALLOW
20802 POKE VO,15
20804 FH=5: FL=0: FV=80
20805 POKE F2,000:POKE F2+1,7
20806 POKE Z1,16*00+9:POKE Z2,16*05+9
20807 POKE S2,16*03+5
20808 POKE S1,16*09+9
20810 POKE F1,000: POKE F1+1,FH
20812 POKE W1,17:POKE W2,129
20814 FOR T=1TO7:NEXT T :POKE W2,128
20815 FOR T=1TO07:NEXT T
20816 FOR T=1TO07
20820 FL=FL+FV
20822 IF FL>255 THEN FL=FL−255:FH=FH+1
20824 POKE F1,FL: POKE F1+1,FH
20826 NEXT T
20830 POKE W1,16:POKE W2,0
20839 RETURN
22000 REM **** DINGLE
22002 POKE VO,15
22004 FH=7 :FL=0: FV=16
22006 POKE Z1,00:POKE Z2,00:POKE Z3,00
22007 POKE S1,16*11+10
22008 POKE S2,16*11+10
22009 POKE S3,16*13+4
22010 FOR T=1TO 3
22011 GOSUB 22020
22012 POKE F1,FL:POKE F1+1,FH:POKEW1,32:POKEW1,33
22013 GOSUB 22020
22014 POKE F2,FL:POKE F2+1,FH:POKEW2,32:POKEW2,33
22015 GOSUB 22020
22016 POKE F3,FL:POKE F3+1,FH:POKEW3,32:POKEW3,33
22017 NEXT T
22018 GOTO 22030
22020 FH=FH+FV
22024 RETURN
22030 POKE W1,32:POKE W2,32:POKE W3,32
22039 RETURN
22100 REM **** ALARM BELLS
22102 POKE VO,15
22104 POKE Z1,0:POKE Z2,0
22106 POKE S1,16*11+10
22107 POKE S2,16*11+10
22110 POKE F1,064:POKE F1+1,100
22112 POKE F2,176:POKE F2+1,180
22120 FOR TT = 1 TO 11:REM DURATION
22130 GOSUB 22150
22132 NEXT TT
22134 FOR TT = 1 TO 500 :NEXT TT
22140 POKE W1,0:POKE W2,0
22149 RETURN
22150 POKE W1,19 :REM BELL 1
22152 FOR T=1TO35:NEXT T
22154 POKE W1,18
22160 POKE W2,19 :REM BELL 2
22162 FOR T=1TO35:NEXT T
22164 POKE W2,18
22179 RETURN
22200 REM **** BUZZ SWITCH
22202 POKE VO,15
22204 POKE Z1,16+3:POKE S1,16*13+9
22206 POKE F1,32:POKE F1+1,2
22208 POKE P1,00:POKE P1+1,4
22210 POKE W1,65
22215 POKE W1,128
22218 POKE W1,64
22219 RETURN
22225 POKE W2,128
22300 REM **** SET UP TICK TOCK
22302 POKE VO,15
22304 POKE Z1,0:POKE Z2,0
22305 POKE S1,0:POKE S2,0
22307 POKE F1,0:POKE F1+1,58
22308 POKE F2,0:POKE F2+1,92
22309 RETURN
22310 REM **** TICK
22312 POKE W1,129
22315 POKE W1,128
22319 RETURN
22320 REM **** TOCK
22322 POKE W2,129
22325 POKE W2,128
22329 RETURN
23000 REM **** SET UP CLYDE WRITING
23002 POKE VO,15:FL=0
23006 POKE Z1,00:POKE Z2,00:POKE Z3,00
23007 POKE S1,16*13+4
23008 POKE S2,16*13+4
23009 POKE S3,16*13+4
23090 RETURN
23100 REM *** CLYDE WRITE
23110 GOSUB 23200 :REM READ NUMBER
23120 POKE F1,FL:POKE F1+1,FH
23125 POKE W1,33:POKE W1,32
23130 GOSUB 23200 :REM READ NUMBER
23140 POKE F2,FL:POKE F2+1,FH
23145 POKE W2,17:POKE W2,16
23149 RETURN
23150 GOSUB 23200 :REM READ NUMBER
23160 POKE F3,FL:POKE F3+1,FH
23165 POKE W3,17:POKE W3,16
23190 RETURN
23200 READ FH
23210 IF FH<0 THEN RESTORE: GOTO 23200
23228 FH=FH+70
23229 RETURN
23300 REM **** SET UP RANDOM NOTE
23302 POKE VO,15
23304 POKE F3+1,20:POKE W3,128
23306 POKE Z1,3*16+3:POKE S1,15*16+2
23309 RETURN
23310 REM **** PLAY RANDOM NOTE
23312 VA=PEEK (54299)
23314 POKE F1+1,VA
23315 POKE W1,33
23318 FOR T=1 TO 20:NEXT T
23319 RETURN
23400 REM *** PACKMAN SETUP
23401 POKE VO,15
23402 POKE Z3,16*3+0:POKE S3,16*15+2
23403 RETURN
23410 REM *** PACKMAN RISE SOUND
23413 FL=64:FH=7:FV=64
23420 POKE F3,FL:POKE F3+1,FH
23424 POKE W3,17
23430 FOR T=1 TO 08
23432 FL=FL+FV
23434 IF FL>255 THEN FL=FL−255:FH=FH+1
23436 POKE F3,FL:POKE F3+1,FH
23437 NEXT T
23438 POKE W3,16
23439 RETURN
23440 REM *** PACKMAN FALL SOUND
23442 FOR T=1 TO 7
23445 FL=FL−FV
23446 IF FL<0 THEN FL=FL+255:FH=FH−1
23448 POKE F3,FL:POKE F3+1,FH
23449 NEXT T
23450 RETURN
23500 REM **** COUNTDOWN
23502 POKE VO,15
23504 POKE Z1,16+3:POKES1,16*13+0
23506 POKE F1,0:POKE F1+1,176
23508 POKE W1,33
23510 FORT=1TO15:NEXT T
23528 POKE W1,32
23529 RETURN
32000 PRINT"" :GOSUB22300:TI$=""
32001 T0=INT(VAL(TI$))
32005 X=2:Y=0:T=INT(VAL(TI$)/100):TT$=TI$:T3=VAL(TI$)
32010 E$="":IFT>=1200THEN E$="":IFT>=1300 THEN T=T−1200
32015 T1$=RIGHT$(""+MID$(STR$(INT(T/100)),2),2)
32017 T2$=RIGHT$(""+MID$(STR$(T−T1*100),2),2)
32020 D$=T1$+""+T2$+"":C$=""
32025 GOSUB1000
32030 :
32032 X=2:Y=8:D$=""+E$+"":C$="":GOSUB1000:GOSUB22310
32100 X=2:Y=16:D$=""+RIGHT$(TI$,2)
32110 C$="":GOSUB1000:GOSUB22320
32112 PRINT "";
32114 PRINT "";
32120 IFTI$=TT$THEN32120
32130 IFT355ANDJ<57THENY0=Y:J0=J:GOSUB40310:Y=Y0
40275 A=46:IFI<132ORI>176THENA=42+L
40280 J=J+Y:I=I+XX:IFZ9=1THENZ9=2:GOSUB40430
40284 POKESP,A:POKEV+41,CL(ZZ):POKESP+1,47+L:L=(L+1)AND3
40285 IFJ>128THENPOKEV+21,PEEK(V+21)OR4:XX=6
40286 IFI+4>=JANDZZ=0THENZZ=1:Y=XX:GOSUB20800:Z9=1:J=0:POKEV+21,4
40290 IFXX>0THENZX=1−ZX:ONZX+1GOSUB20710,20720
40295 JJ=−(I>256)*10000:NEXT
40297 D=1000:GOSUB1100:PRINT ""
40299 POKEV+21,0:POKEV+29,0:GOSUB1100
40300 RETURN
40310 X=2:Y=2:D$="":C$="":GOSUB1000
40320 X=2:Y=15:D$="":C$="":GOSUB1000:RETURN
40350 GOSUB23410:GOTO23440
40360 GOSUB20710:GOTO20720
40393 REM IFZ0<>ZQTHENZ0=ZQ:ONZQGOSUB40310,40400,40410,40420,40430:X=9:Y=Y0
40394 REM ONZQGOSUB40350,40360
40400 X=2:Y=2:D$="":C$="":GOSUB1000
40402 Y=15:D$="":C$="":GOSUB1000
40404 RETURN
40410 X=2:Y=2:D$="":C$="":GOSUB1000
40412 Y=15:D$="":C$="":GOSUB1000
40414 RETURN
40420 X=2:Y=2:D$="":C$="":GOSUB1000
40422 Y=15:D$="":C$="":GOSUB1000
40424 RETURN
40430 X=2:Y=2:D$="":C$="":GOSUB1000
40432 Y=15:D$="":C$="":GOSUB1000
40434 RETURN
45000 U(1)=34:T$(1)=""
45002 U(2)=17:T$(2)=""
45004 U(3)= 9:T$(3)="" "
45006 U(4)=21:T$(4)=""
45008 REMU(5)=18:T$(5)=""
45010 U(6)=13:T$(6)=""
45012 X=6
45020 FORI=1TO6:U=U+U(I):NEXT
45021 FORI=1TO6:W(I)=INT(100*U(I)/U+.5):W=W+W(I):NEXT
45022 :
45030 REM C$(1)=""
45032 P(1)=1565:F(1,2)=2:M(1)=16:F(1,3)=1:F(1,4)=1:F(1,5)=3:F(1,6)=3
45040 REM C$(2)=""
45042 P(2)=1530:F(2,2)=3:M(2)=48:F(2,3)=3:F(2,4)=3:F(2,5)=3:F(2,6)=2
45050 C$(3)=""
45052 P(3)= 595:F(3,2)=3:M(3)=64:F(3,3)=3:F(3,4)=1:F(3,5)=2:F(3,6)=2
45060 REMC$(4)=""
45062 P(4)= 899:F(4,2)=3:M(4)=16:F(4,3)=3:F(4,4)=2:F(4,5)=2:F(4,6)=2
45070 REM C$(5)=""
45072 P(5)= 999:F(5,2)=3:M(5)=16:F(5,3)=1:F(5,4)=2:F(5,5)=2:F(5,6)=3
45080 REM C$(6)=""
45082 P(6)= 399:F(6,2)=3:M(6)=16:F(6,3)=1:F(6,4)=1:F(6,5)=2:F(6,6)=3
45084 :
45086 FORI=1TOX:P=P+P(I):M=M+M(I):NEXT:AM=INT(M/X+.5):AP=INT(P/X+.5)
45088 FORI =1TOX:UT=W(1)*3*(AP−P(I))/AP
45090 UT=UT+W(2)*.5*(F(I,2)+3*(M(I)−AM)/AM)
45092 FORJ=3TO6:UT=UT+F(I,J)*W(J):NEXT
45094 UT(I)=UT:REM PRINT C$(I),UT
45096 :
45098 NEXT
45100 :
45102 GOSUB1500:GOTO35300
READY.