home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 8 / 008.d81 / recollect (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  8KB  |  282 lines

  1. 10 s=65520:f=54272
  2. 20 poke783,peek(783)and254
  3. 30 poke53280,14:poke53281,1:printchr$(14):printchr$(8):dimqu$(60),re$(60)
  4. 39 :
  5. 40 gosub10000:rem *** title page ***
  6. 49 :
  7. 50 gosub11000:rem *** instructions ***
  8. 59 :
  9. 60 gosub4000:rem *** read text file ***
  10. 69 :
  11. 70 gosub1100:rem *** scramble query and repsonse ***
  12. 79 :
  13. 80 gosub3000:rem *** format screen ***
  14. 89 :
  15. 90 gosub1200:rem *** get query and response ***
  16. 99 :
  17. 100 q$=qu$:v=5:h=1:lf=38:gosub1000
  18. 109 :
  19. 110 v=13:h=4:pp=0:pr=0:gosub2100:rem *** keyboard input ***
  20. 119 :
  21. 120 ifflag=1thenpoke781,13:poke782,4:syss:printre$:gosub970
  22. 130 ifflag=1thensc=0:poke781,21:poke782,9:syss:print"[206]o points for this one![146]"
  23. 135 flag=0
  24. 139 :
  25. 140 hs=hs+sc:poke781,19:poke782,10-len(str$(hs)):syss:prinths:sc=0
  26. 149 :
  27. 150 poke781,23:poke782,5:syss:print"[196]o you want to continue (y/n)? "
  28. 160 poke198,0:wait198,1:getkey$
  29. 170 ifkey$="y"orkey$="[217]"then80
  30. 180 ifkey$="n"orkey$="[206]"then200
  31. 190 goto150
  32. 200 poke781,23:poke782,0:syss
  33. 205 print"[196]o you want to select another category":print"(y/n)?";
  34. 210 poke198,0:wait198,1:getkey$
  35. 220 ifkey$="y"orkey$="[217]"then60
  36. 230 ifkey$="n"orkey$="[206]"then3200
  37. 240 goto200
  38. 900 stop
  39. 957 :
  40. 958 rem *** wrong letter sound      ***
  41. 959 :
  42. 960 pokef+24,15:pokef+6,240:pokef+4,17
  43. 961 forx1=25to1step-4:pokef+1,26-x1:nextx1:pokef+4,32:pokef+4,16:return
  44. 967 :
  45. 968 rem *** wrong answer sound      ***
  46. 969 :
  47. 970 pokef+24,24:pokef+6,240:pokef+4,17
  48. 971 fora=1to4:forx1=16to62step4:pokef+1,77-x1:nextx1:nexta:pokef+4,32
  49. 972 pokef+4,16:return
  50. 977 :
  51. 978 rem *** right answer sound      ***
  52. 979 :
  53. 980 pokef+24,15:pokef+6,240:pokef+4,17
  54. 981 fora=1to4:forx1=1to25:pokef+1,80-x1:nextx1:nexta:pokef+4,32:pokef+4,16:return
  55. 987 :
  56. 988 rem *** letter sound            ***
  57. 989 :
  58. 990 pokef+1,14:pokef+5,3:pokef+6,240:pokef+24,15:pokef+4,17
  59. 991 ford=3to40step15:pokef+1,d:pokef+4,17:nextd:pokef+4,32:return
  60. 997 :
  61. 998 rem *** format statements      ***
  62. 999 :
  63. 1000 iflen(q$)>lfthen1020
  64. 1010 poke781,v:poke782,h:syss:printq$:return
  65. 1020 yf=0:xf=lf
  66. 1030 ifmid$(q$,xf,1)=chr$(32)thenpoke781,v:poke782,h:syss
  67. 1040 ifmid$(q$,xf,1)=chr$(32)thenprintleft$(q$,xf-1):v=v+1:goto1060
  68. 1050 xf=xf-1:goto1030
  69. 1060 yf=xf+lf:ifyf>len(q$)thenyf=len(q$)-xf
  70. 1070 ifyf<=lfthenpoke781,v:poke782,h:syss:printright$(q$,yf):return
  71. 1080 ifmid$(q$,yf,1)=chr$(32)thenpoke781,v:poke782,h:syss
  72. 1090 ifmid$(q$,yf,1)=chr$(32)thenprintmid$(q$,xf+1,yf-xf):xf=yf:v=v+1:goto1060
  73. 1095 yf=yf-1:goto1080
  74. 1097 :
  75. 1098 rem *** scramble query/response ***
  76. 1099 :
  77. 1100 forx=1tonu:a%=(rnd(1)*nu)+1
  78. 1105 t1$=qu$(x):qu$(x)=qu$(a%):qu$(a%)=t1$
  79. 1110 t2$=re$(x):re$(x)=re$(a%):re$(a%)=t2$:next:z9=0
  80. 1120 return
  81. 1197 :
  82. 1198 rem *** get query/response    ***
  83. 1199 :
  84. 1200 z9=z9+1:ifz9>nuthen1220
  85. 1210 qu$=qu$(z9):re$=re$(z9):return
  86. 1220 printchr$(147):print"[207]ne moment, please, while [201] get some"
  87. 1230 print"more questions......."
  88. 1240 gosub1100:gosub3000:goto1200
  89. 2097 :
  90. 2098 rem *** keyboard input        ***
  91. 2099 :
  92. 2100 forx=1tolen(re$):ti$="000000"
  93. 2110 getkey$:gosub2200:ifsc<=0thenflag=1:x=len(re$):goto2150
  94. 2111 ifkey$=""then2110
  95. 2115 ifkey$=chr$(133)thenflag=1:x=len(re$):goto2150
  96. 2116 ifkey$>chr$(192)thent$=chr$(asc(key$)-128):goto2118
  97. 2117 t$=key$
  98. 2118 m$=mid$(re$,x,1):ifm$>chr$(128)thenm$=chr$(asc(m$)-128)
  99. 2120 ift$=m$thengosub2220:goto2150
  100. 2140 pp=pp+1:gosub960:goto2110
  101. 2150 next
  102. 2155 ifflag=0thenpoke781,12:poke782,24:syss:print"[129] [210][201][199][200][212]! [146]":gosub980
  103. 2160 return
  104. 2197 :
  105. 2198 rem *** timer/score routine    ***
  106. 2199 :
  107. 2200 ifti$<>"000000"thenpr=pr+1:ti$="000000"
  108. 2205 sc=100-pp-pr
  109. 2210 poke781,10:poke782,38-len(str$(sc)):syss:printsc:return
  110. 2217 :
  111. 2218 rem *** print key              ***
  112. 2219 :
  113. 2220 poke781,v:poke782,h:syss:printkey$:gosub990:h=h+1:return
  114. 2997 :
  115. 2998 rem *** format screen          ***
  116. 2999 :
  117. 3000 printchr$(147):poke781,1:poke782,0:syss
  118. 3010 forx=1to120:print"*";:next
  119. 3020 print"":forx=1to80:print"*";:next
  120. 3030 print"":forx=1to80:print"*";:next
  121. 3040 poke781,2:poke782,15:syss:print" [210][197][195][207][204][204][197][195][212][160][146]"
  122. 3050 poke781,10:poke782,20:syss:print"[213][206][201][212][160][211][195][207][210][197] >>>[146]"
  123. 3060 poke781,11:poke782,0:syss:print"[212][200][197][160][210][197][211][208][207][206][211][197][160][201][211]:[146]"
  124. 3070 poke781,13:poke782,0:syss:print">>>[146]"
  125. 3080 poke781,18:poke782,0:syss:print"[199][193][205][197][160][211][195][207][210][197][146]"
  126. 3090 poke781,18:poke782,18:syss:print"[208]ress <[198]1>[146] for answer"
  127. 3100 :
  128. 3110 poke781,19:poke782,10-len(str$(hs)):syss:prinths:sc=0
  129. 3120 return
  130. 3197 :
  131. 3198 rem *** end game               ***
  132. 3199 :
  133. 3200 printchr$(147)
  134. 3210 print"[217]our final score was "hs:flag=0
  135. 3219 :
  136. 3220 open15,8,15:open4,8,4,"0:r.high score,seq,read"
  137. 3230 forx=0to9:input#4,h$(x,0):input#4,h$(x,1):next:close4:close15
  138. 3239 :
  139. 3240 ifhs<val(h$(9,1))thenflag=1
  140. 3249 :
  141. 3250 ifflag=1thenprint"[217]our score was not high enough to be"
  142. 3260 ifflag=1thenprint"included in my high score list."
  143. 3270 ifflag=1thenprint"[194]etter luck next time!":flag=0:goto3510
  144. 3279 :
  145. 3280 print:print"[217]our score was very good!  [197]nter your"
  146. 3290 print"initials and [201] will include it in my"
  147. 3300 print"high score list!"
  148. 3309 :
  149. 3310 print:print
  150. 3320 input"[197]nter your initials";it$
  151. 3330 print:print"[207]ne moment, please....."
  152. 3340 ifit$=""thenit$="[193][193][193]"
  153. 3350 iflen(it$)>3thenit$=left$(it$,3)
  154. 3360 h$(9,0)=it$:h$(9,1)=right$(str$(hs),len(str$(hs))-1)
  155. 3369 :
  156. 3370 fori=0to8:forj=i+1to9:ifval(h$(i,1))>=val(h$(j,1))then3400
  157. 3380 k$=h$(i,1):h$(i,1)=h$(j,1):h$(j,1)=k$
  158. 3390 k$=h$(i,0):h$(i,0)=h$(j,0):h$(j,0)=k$
  159. 3400 nextj:nexti
  160. 3409 :
  161. 3410 open15,8,15,"i0":print#15,"s0:r.high score"
  162. 3420 open4,8,4,"0:r.high score,seq,write"
  163. 3430 forx=0to9:print#4,h$(x,0):print#4,h$(x,1):next
  164. 3440 close4:close15
  165. 3449 :
  166. 3450 poke781,23:poke782,1:syss:print"[208]ress ([211][208][193][195][197] [194][193][210]> to continue.";
  167. 3460 poke198,0:wait198,1:getkey$
  168. 3469 :
  169. 3470 printchr$(147):print"[200]igh scores for [210][197][195][207][204][204][197][195][212] are:"
  170. 3480 print:forx=0to9:printh$(x,0);tab(15-len(h$(x,1)));h$(x,1):print:next
  171. 3489 :
  172. 3490 poke781,23:poke782,1:syss:print"[208]ress <[211][208][193][195][197] [194][193][210]> to continue.";
  173. 3500 poke198,0:wait198,1:getkey$
  174. 3509 :
  175. 3510 printchr$(147):print:print:print"[196]oes someone else want to try [210][197][195][207][204][204][197][195][212] (y/n)?[160]";
  176. 3520 poke198,0:wait198,1:getkey$
  177. 3530 ifkey$="y"orkey$="[217]"thensc=0:hs=0:goto60
  178. 3540 ifkey$="n"orkey$="[206]"then3560
  179. 3550 goto3520
  180. 3559 :
  181. 3560 print"[147]"
  182. 3562 print:print:print:print"[212]hanks for playing [210][197][195][207][204][204][197][195][212]!"
  183. 3569 :
  184. 3570 goto63000  :rem *** end ***
  185. 3997 :
  186. 3998 rem *** read text file        ***
  187. 3999 :
  188. 4000 printchr$(147)
  189. 4010 print"[215]hich file would you like me to get?"
  190. 4020 poke781,5:poke782,5:syss:print"0.  [197]xit program"
  191. 4030 poke781,7:poke782,5:syss:print"1.  [210][197][195][207][204][204][197][195][212] written word"
  192. 4040 poke781,9:poke782,5:syss:print"2.  [210][197][195][207][204][204][197][195][212] tv shows"
  193. 4050 poke781,11:poke782,5:syss:print"3.  [210][197][195][207][204][204][197][195][212] literary"
  194. 4060 poke781,14:poke782,1:syss:print"[215]hich one (0-3) -[160]";
  195. 4070 poke198,0:wait198,1:getkey$:printkey$
  196. 4075 ifkey$="0"then3200
  197. 4080 ifkey$="1"thenfi$="r.written word":goto4120
  198. 4090 ifkey$="2"thenfi$="r.tv shows":goto4120
  199. 4100 ifkey$="3"thenfi$="r.literary":goto4120
  200. 4110 goto4060
  201. 4120 print:print:print"[207]ne moment, please, while [201] get the     information...."
  202. 4122 open15,8,15
  203. 4125 open4,8,4,"0:"+fi$+",seq,read"
  204. 4130 input#4,nu
  205. 4140 forx=1tonu:input#4,qu$(x):input#4,re$(x):next
  206. 4150 close4:close15
  207. 4160 return
  208. 9997 :
  209. 9998 rem *** title page            ***
  210. 9999 :
  211. 10000 printchr$(147)
  212. 10010 printtab(12)"*#*#*#*#*#*#*#*"
  213. 10020 printtab(12)"#             #"
  214. 10030 printtab(12)"*             *"
  215. 10040 printtab(12)"#  [210][197][195][207][204][204][197][195][212]  #"
  216. 10050 printtab(12)"*             *"
  217. 10060 printtab(12)"#             #"
  218. 10070 printtab(12)"*#*#*#*#*#*#*#*"
  219. 10080 print:print:printtab(9)"[193] [199]ame of [210]emembering"
  220. 10090 print"";