8-Bit Software Online Conversion
:0.$.MAIN - Listing
0REM"***CHAIN LETTERS - V.3.70****<c
> D Shepherdson 1990/91**
10ONERROR VDU22,7:PRINT''"Chain Lette
rs - Version V.3.70."'"The following pro
blem has arisen."'"Please inform DS as s
oon as"'"possible, thank you.":REPORT:PR
INT" at line ";ERL'"Press a key":?&FE4E=
&7F:IFGET:CALL!-4:END
20REM ONERROR VDU22,7:REPORT:PRINT" a
t line ";ERL:END
40VDU6:OSCLI"FX21,0":MODE2:CLEAR:n%=1
:£%=10:r%=RND(-TIME):Z%=FALSE:O%=TRUE:G%
=FALSE:PROCmain(1):IFV%PROCmain(0)
50PROChiscores
130DEFPROCbox(X,Y,C1%,C2%):X%=X*32:Y%=
700-(Y*32):VDU18;C1%,25,4,X%;Y%;25,4,X%+
150;Y%;25,85,X%+150;Y%+150;25,4,X%;Y%+15
0;25,85,X%;Y%;18;C2%,25,4,X%+25;Y%+25;25
,4,X%+125;Y%+25;25,85,X%+125;Y%+125;25,4
,X%+25;Y%+125;25,85,X%+25;Y%+25;:ENDPROC
150DEFPROCscreen:LOCALI%:VDU23;8202;0;
0;0;28;31,19,8,19;4;0;19,4;0;0:FORI%=8TO
15:VDU19,I%,3;0;:NEXT:PROC3dt(8.5,0,1,3,
"CHAIN LETTERS"):PROC3dt(6,5.2,1,3,"Your
Score :"):FORI%=1TO3:PROCt(13+I%,1,3,MI
D$("O/O",I%,1)):NEXT
160PROCspeaker:PROC3dt(-1,25.5,1,3,"¶
D Shepherdson 199O"):PROCwindow:ENDPROC
170DEFPROCt(X%,Y%,C%,t$):IFt$="0"t$="O
"
180VDU31,X%,Y%,17,C%:PROCdefine(ASCt$)
:ENDPROC
200DEFPROC3dt(X,Y,C1%,C2%,t$):LOCALI%:
IFX=-1X=22-LEN(t$):IFX<0X=0
210X%=X*32:Y%=900-(Y*32):VDU5:FORI%=1T
OLENt$:A%=ASCMID$(t$,I%,1):IFA%<>32VDU18
,0,C1%,25,4,X%;Y%;:PROCdefine(A%):VDU18,
0,C2%,25,4,X%+8;Y%+4;250,8,10,251
215IFA%=32X%=X%-20 ELSE IF(A%=119 OR A
%=109ORA%=87) X%=X%+10
220X%=X%+60:NEXT:VDU4:ENDPROC
250DEFPROCwindow:VDU26,28;31,19,6,24,0
;100;1279;1100;:ENDPROC
300DEFPROChiscores:OSCLI"FX21,0":$&11A
0=RIGHT$(" "+STR$(Z%*10),8):OSCLI"
FX202,48":OSCLI"FX15":CALL &1400:OSCLI"F
X202,32,9":OSCLI"FX15":RUN
320DEFPROCdefine(A%):CALL U%:ENDPROC
400DEFPROCgiveup:p%=0:SOUND0,4,148,2:I
FK%=0PROCwipe
410PROC3dt(-1,17,4,3,"Give up do you?!
?"):VDU19,8+P%,3;0;:G%=TRUE:ENDPROC
420DEFPROCscore:LOCALI%:COLOUR128:t$=S
TR$Z%+"/"+STR$N%+" ":FORI%=1TOLENt$:PROC
t(13+I%,3,3,MID$(t$,I%,1)):NEXT:ENDPROC
550DEFPROCwipe:VDU18,0;26,24,0;100;127
9;380;16:PROCwindow:ENDPROC
590:
4000DEF FNcomp REPEATP%=RND(L%)-1:UNTIL
P%<>O%:=P%
4060:
4070DEFPROCspeaker:VDU5,25,4,1200;200;1
8,0,1:PROCdefine(252):VDU25,4,1200;200;1
8,0,3:PROCdefine(253):IFQ%=78VDU25,4,120
0;200;18,0,4:PROCdefine(254)
4080VDU4:ENDPROC
4090:
4100DEF FNplayer:P%=FNinkey:I%=INSTR($W
%,CHR$(P%-32)):IFK%=0J%=INSTR($W%,CHR$(P
%-32),I%+1):REM IFJ%>0 P."WHICH ONE?"
4110IFI%>L%=-1 ELSEIFP%=45 =45 ELSE =I%
-1
5000DEFPROCmain(K%):P%=TRUE:end%=FALSE:
S=(5-L%)*2+.75
5010IFK%=1PROCscreen:FORI%=0TOL%-1:PROC
box((I%+1)*6+S,£%,I%+8,1):NEXT
5020IFK%=0p$="game two: you choose" ELS
E p$="game one: I choose"
5030PROCnew`word:N%=n%:PROC3dt(-1,£%+7.
5,4,3,p$):PROC3dt(-1,£%+10,4,3,"the lett
er to change"):PROC3dt(-1,£%+12.5,4,3,"p
lease press a key"):OSCLI"FX21,0":P%=GET
:*FX21,0
5040PROCwipe:REPEAT
5100IFK%=1 P%=FNcomp ELSE PROC3dt(-1,£%
+8,4,3,"pick letter to change"):REPEAT P
%=FNplayer:UNTILP%>=0:PROC3dt(-1,£%+11,4
,3,"now make a new word")
5105O%=P%:SOUND1,2,148,2:SOUND2,2,148,2
:VDU19,8+P%,12;0;:M%=FNinkey:w%=(P%?W%)+
32:IFM%>64VDU19,8+P%,3;0;:P%?W%=M%-32:PR
OCchange(w%,M%):PROCwipe:p%=FNcheck ELSE
IFM%=45:PROCgiveup:GOTO5120
5110COLOUR128:IFp%=1PROC3dt(-1,17,4,3,"
well done!"):SOUND1,1,148,2:SOUND2,1,148
,2 ELSE PROC3dt(-1,17,4,3,"word not foun
d!"):SOUND1,3,148,2:SOUND2,3,148,2
5120Z%=Z%+p%:C%=p%:IFp%=1PROCscore ELSE
PROCmyword(w%-32,M%-32)
5130COLOUR128:PROC3dt(-1,19.5+(ABS(C%=0
)*2.5),4,3,"please press a key"):SOUND0,
-5,4,1:OSCLI"FX15":IFGET
5133PROCwipe:IF N%<9+n%IFp%=2p%=0:PROCn
ew`word
5135N%=N%+1:IFN%>=n%+10end%=TRUE
5140UNTILend%=TRUE:n%=N%:ENDPROC
5600DEFPROCnew`word:LOCALI%:COLOUR129:w
$=FNgetfirst:FORI%=1TOL%:r%=ASCMID$(w$,I
%)+32:PROCt(3*I%+(6-L%),£%+1,4,CHR$(r%))
:NEXT:SOUND1,3,148,2:SOUND2,3,148,2:P%=1
0:ENDPROC
5620 DEF FNinkey:REPEAT OSCLI"FX21,0":M
%=(GET AND &DF):IFM%=129:Q%=78:PROCspeak
er:*FX210,1
5630IFM%=130:Q%=89:PROCspeaker:*FX210,0
5633IFM%=13ANDK%=0M%=0
5635IFM%=27 PROChiscores
5640UNTILM%=13 OR M%>64ANDM%<91 AND M%<
>W%?P%:OSCLI"FX21,0":=M%+32
6000DEF FNgetfirst:r%=RND(D%)*L%+&82B0:
E%?1=r%MOD256:E%?2=r%DIV256:CALLF%:=$W%
6060DEFPROCchange(w%,M%):LOCAL X%,Y%,A%
,I%,J%:J%=&88:COLOUR129:X%=&87:A%=10:?X%
=w%:CALL&FFF1:X%=&7F:?X%=M%:CALL&FFF1:RE
PEAT:OSCLI"FX19":OSCLI"FX19"
6070VDU23,249:FORI%=0TO7:VDUJ%?I%:NEXT:
PROCt((P%+1)*3+(6-L%),£%+1,4,CHR$249):J%
=J%-1:UNTILJ%=&7F:COLOUR128:ENDPROC
6090DEF FNcheck:CALLT%:=?&80
6110DEFPROCmyword(w%,M%):LOCALI%:I%=65:
REPEAT:IF I%=w%ORI%=M%I%=I%+1
6120P%?W%=I%:p%=FNcheck:I%=I%+1:UNTILI%
>90ORp%=1:IF p%=1 w$="":FORI%=0TOL%-1:w$
=w$+CHR$((I%?W%)+32):NEXT:PROC3dt(-1,19.
25,4,3,"my word is "+w$):PROCscore
6125IF (p%=0ANDG%=0) PROC3dt(-1,19.5,4,
3,"I don't know either!"):N%=N%-1
6130IF (p%=0 AND G%) PROC3dt(-1,19.5,4,
3,"So do I!"):N%=N%-1
6140G%=FALSE:p%=2:ENDPROC