8-Bit Software Online Conversion
Chain Letters Game - Listing
10REM >LoadRam 3.65
20REM Rom Image Loader Utility
30REM for Qrom plus check for
40REM Other Programs needed by
50REM Program and Installs Words
55IFPAGE<&1900:PAGE=&1900:CHAIN"LOADR
AM"
60VDU6:B%=?&F4:ONERROR CLOSE#0:REPORT
:PRINT" at line ";ERL:END
65ENVELOPE1,133,8,4,8,3,1,1,126,0,0,-
10,96,80:ENVELOPE 2,3,0,0,0,0,0,0,121,-1
0,-1,-2,96,96:ENVELOPE3,1,-5,-10,-50,255
,246,100,0,0,-1,-3,120,120:ENVELOPE4,1,0
,0,0,0,0,0,90,-1,-2,-3,97,97
70MODE7:PROCfindram:PROCtitle:REPEAT
Q%=(GET AND &DF):UNTILQ%=78ORQ%=89:S$="T
hank you - Sound ":IFQ%=78S$=S$+"Off" EL
SE S$=S$+"On"
75VDU12:PROCprint(" "+S$):PROClevel:P
ROCprint(" Please wait ... Loading Data"
)
80PROCinit:SOUND1,2,148,2:SOUND2,2,14
8,2:OSCLI"FX201,0"
85PROCass:IFL%=4 D%=2220 ELSEIFL%=3D%
=440 ELSE D%=2650:REM Actual: 3=447,
4=2222, 5=2656
90VDU23,255,126,195,157,161,161,157,1
95,126:IFQ%=78OSCLI"FX210,1"
100OSCLI"FX21,0":OSCLI"FX18":A$="NEW|M
*RLOAD "+STR$L%+"QROM "+STR$÷R%+" Q|M*LO
AD MCODE 1400|M*FX225,0,0|MCH."+CHR$34+"
MAIN"+CHR$34+"|M|F":OSCLI"KEY0 "+A$
110VDU23,252,3,5,233,177,177,233,5,3,2
3,253;2,6,78,78,6,2;23,254,129,66,36,24,
24,36,66,129
180VDU21:*FX138,0,128
190END
200DEFPROClevel:PROCprint(" 1 or 2 par
t game (1/2) ?"):REPEATL%=(GET OR16)-48:
UNTILL%=1ORL%=2:IFL%=2V%=TRUE ELSE V%=FA
LSE
205PROCprint(" Please pick level of wo
rd play"):PROCprint(" 3, 4 or 5 letters
per word (3/4/5) ?"):REPEATL%=(GET OR 1
6)-48:UNTILL%>2ANDL%<6
210PROCprint(" Level "+STR$L%+" letter
s selected"):PROCprint(" Thank you"):END
PROC
900END
3000DEFPROCfindram
3010FORI%=0TO2STEP2
3020P%=&900:[OPT I%
3030.S%
3040 LDA&F4:PHA:LDX#15:.loop
3050 TXA:STA&F4:STA&FE30
3060 LDA#&10:LDY#2:.lp1 STA&8000,Y:DEY:
BNElp1
3070LDY#2:.lp2 LDA&8000,Y:CMP#&10:BEQen
d:DEY:BNElp2:DEX:BNEloop:LDY#0:.lp3 LDAm
ess,Y:BEQend:JSR&FFE3:INY:BNElp3:.end PL
A:STA&F4:STA&FE30:RTS
3080.mess EQUB130:EQUS"RAM not found on
this machine":EQUB13:EQUB130:EQUS"Pleas
e Set RAM Switch and re-try":EQUB13:BRK
3110RTS:]:NEXT
3120!&70=USR(S%):Y%=?&72:R%=?&71:IFY%<>
2 END
3130ENDPROC
3140:
3200DEFPROCinit:*FX201,1
3220$&1100=STRING$(9," D. Shepherdson "
):$&11B0=STRING$(9," 10"):$&11A0="
"
3230*FX4,1
3240*FX9,25
3250*FX10,25
3260*FX11
3270*FX18
3280*FX20
3290*FX15
3300*FX119
3310*FX137,0
3320*FX200,3
3325*FX210,0
3327*FX226,128,0
3328*FX227,0,0
3329*FX228,0,0
3330*FX229,1
3340*FX247,0
3360ENDPROC
3370:
4000DEFPROCerror(t$):ONERROR OFF
4010?&F4=B%:?&FE30=B%:IFt$="" REPORT:PR
INT" at line ";ERL:OSCLI"FX201,0":END
4020PRINTt$:OSCLI"FX201,0":END
4030REM "Legal" Error Handler
4040?&F4=B%:?&FE30=B%:REPORT:PRINT" at
line ";ERL:*FX201,0
4050END
4060:
4090DEFPROCtitle:VDU12,23;8202;0;0;0;0;
:PROCprint(" CHAIN LETTERS!!!"):VDU28,0,
24,39,2,31,0,0:T%=OPENIN("TEXT2"):IFT%=0
PRINT"Information file NOT found! Please
check correct disk available":CLOSE#0:E
ND
4095H%=1:S%=EXT#T%+&80:DIM word% S%,A$(
15):OSCLI"LOAD TEXT2 "+STR$÷word%
4100I%=word%:REPEAT :J%=1:REPEATA$="":R
EPEAT a%=?I%:IFa%=ASC"["a%=136 ELSEIFa%=
ASC"]"a%=137ELSEIFa%=ASC"¼"a%=130ELSEIFa
%=ASC"¾"a%=131
4102IF INKEY(-1) CLS:PROCprint("do you
wish sound during the game"):PROCprint("
please enter Y for yes or N for no"):END
PROC
4105I%=I%+1:IFa%<>64A$=A$+CHR$a%
4110UNTILINSTR("@*"+CHR$13,CHR$a%):A$(J
%)=A$:J%=J%+1:UNTILINSTR("@*",CHR$a%):J%
=J%-2:IFH%>1 PROCprint("*")
4115H%=H%+1:FORK%=1TOJ%:PROCprint(A$(K%
)):NEXT:UNTILa%=64:CLOSE#0:ENDPROC
4120
4130DEFPROCprint(a$):LOCAL I%,V%:V%=VPO
S:IFa$="*"VDU31,0,VPOS+1,32:PROCprint("
press the space bar to continue "):OSC
LI"FX21":SOUND2,-5,148,2:SOUND&11,-5,196
,2:IFGET:CLS:ENDPROC
4140Y%=(38-LENa$)/2:FORI%=V%TOV%+1:VDU3
1,Y%,I%,141,131:PRINTa$:NEXT:ENDPROC
10000DEF PROCass:o=&FFEE:FORI%=0TO2STEP2
:P%=&900:[OPT I%:.F% LDA&F4:PHA:LDA#R%:S
TA&F4:STA&FE30:LDX#L%-1:.lp:.E% LDA &FFF
F,X:STA word,X:DEX:BPL lp:JMPend:.word:.
W% EQUD0:EQUW&0D0D
10010.T% LDA&F4:PHA:LDA#R%:STA&F4:STA&FE
30:LDA#&B0:STAlp1+1:LDA#&82:STAlp1+2:.lp
0 LDX#L%-1:.lp1 LDA&82B0,X:BEQlast:CMPwo
rd,X:BNEnext:DEX:BPLlp1:LDA#1:STA&80:JMP
end:.next CLC:LDAlp1+1:ADC#L%:STAlp1+1
10020LDA lp1+2:ADC#0:STAlp1+2:JMP lp0:.l
ast LDA#0:STA&80:.end PLA:STA&F4:STA&FE3
0:RTS
10030.U% STA&70:LDX#&70:LDY#0:LDA#10:JSR
&FFF1:LDA#23:JSRo:LDA#250:JSRo:LDX#0:JSR
set:LDA#23:JSRo:LDA#251:JSRo:JSRset:LDX#
3:.prlp LDA c,X:JSRo:DEX:BPLprlp:RTS
10040.set LDA&71,X:JSRo:JSRo:INX:TXA:AND
#3:BNEset:RTS:.c EQUD&FA080AFB
10050]:NEXT:ENDPROC