home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 133 / 133.d81 / blanks (.txt) < prev    next >
Encoding:
Commodore BASIC  |  1995-01-01  |  8.0 KB  |  336 lines

  1. 10 poke53281,0:poke53280,0
  2. 20 poke55,0:poke56,150:clr
  3. 22 dv=peek(186):if dv<8 then dv=8
  4. 30 rem load ml
  5. 40 open 8,dv,8,"ff,p,r":poke 780,0:sys 65493:close8
  6. 50 open 8,dv,8,"fs1,p,r":poke 780,0:sys 65493:close8
  7. 60 open 8,dv,8,"fm,p,r":poke 780,0:sys 65493:close8
  8. 70 print"[147]":poke53272,31:poke788,52
  9. 71 print"[155]            [195][204][201][206][212][207][206]\[207]'[206][197][201][204][204]'[211]"
  10. 72 print" [176][192][174] [178] [174]  [174]     [174][192][174] [174]   [176][192][174] [176][174][176] [174] [176] [176][192][174]"
  11. 73 print" [221]   [221] [221]  [221]     [221] [221] [221]   [221] [221] [221][221][221] [221][176][189] [221]
  12. 74 [153]" -<  (NULL) (NULL)  (NULL) (NULL)left$val -tan< (NULL)   -tan< (NULL)(NULL)(NULL) -<  /tan^
  13. 75 print" [221]   [221] [221]  [221]     [221] [221] [221]   [221] [221] [221][221][221] [221][173][174]   [221]
  14. 76 [153]" exp   > /tanexp/tanexp   exptanexp /tanexp exp / exp/exp exp / /tanexp"
  15. 80 [129]i[178]1[164]9:[153][163]12)""i"cmdcmdcmd\\cont - \(NULL)(NULL)(NULL)(NULL)(NULL)val"i"cmdcmdcmd\\":[130]
  16. 82 [153][163]12)"\0\cont - \(NULL)(NULL)(NULL)(NULL)(NULL)val\10\"
  17. 84 [153][163]12)"\(NULL)\cont - \quit\
  18. 86 geta$:ifa$=""then86
  19. 87 ifa$="q"then40000
  20. 88 ifa$="0"thenpn=10:goto92
  21. 89 ifa$<"1"ora$>"9"then86
  22. 90 pn=val(a$)
  23. 92 poke767,pn:pn$=str$(pn)
  24. 100 dv=peek(186):if dv<8 then dv=8
  25. 110 open 8,dv,8,"fs2,p,r":poke 780,0:sys 65493:close8
  26. 120 open 8,dv,8,"fill"+pn$+",p,r":poke 780,0:sys 65493:close8
  27. 130 open 8,dv,8,"sw"+pn$+",p,r":poke 780,0:sys 65493:close8
  28. 140 poke 841,95:poke 51611,12:poke 51991,14
  29. 150 poke 646,14:print chr$(147):poke 53280,0:poke 53281,0:poke53272,31:sys 51288
  30. 160 get s$:if s$="" then160
  31. 170 print"[147]":poke 657,128
  32. 180 :
  33. 190 poke53265,11:r=0:c=0:gosub600:print tab(11)"[156] fill the blanks ";
  34. 200 n$=str$(peek(767)):l=len(n$):printright$(n$,l-1)"*"
  35. 210 gosub1470:poke 698,0:poke 699,192:gosub660:sys 51424:poke 53265,27
  36. 220 :
  37. 230 r1=2:c1=1:r=r1:c=c1:gosub600:if peek(r*40+c+1024)=32 then gosub810
  38. 240 if tg=0 then poke 55296,3:poke1024,31:rem lf/rt
  39. 250 if tg=1 then poke 55296,3:poke1024,30:rem up/dn
  40. 260 get a$:gosub550:if a$="" then240
  41. 270 if b>127 then gosub560
  42. 280 if a$=""then gosub870:goto240
  43. 290 if a$=""then230
  44. 300 if a$=chr$(20)thenpoke766,0:gosub1750:goto240
  45. 310 if a$=""thengosub810:goto240
  46. 320 if a$=" "then a$="?":goto460
  47. 330 if a$="[145]"thengosub930:goto240
  48. 340 if a$="[147]"then190
  49. 350 if a$=chr$(148)thenpoke766,1:rr=1:gosub1750:goto240
  50. 360 if a$="[157]"then gosub750:goto240
  51. 370 if a$=chr$(133) then tg=1-tg:goto240
  52. 380 ifa$<>chr$(134)then390
  53. 382 dg=1-dg:gosub2980
  54. 384 ifdg=0then388
  55. 386 geta$:ifa$=""then386
  56. 387 dg=0:gosub2980
  57. 388 goto240
  58. 390 if a$=chr$(135) then gosub1380:goto240
  59. 400 if a$=chr$(136) then gosub1420:goto240
  60. 410 if a$=chr$(137) then gosub1900:goto240
  61. 420 if a$=chr$(138) then240
  62. 430 if a$=chr$(139) then240
  63. 440 if a$=chr$(140) then70
  64. 450 if a$<"0" or a$>"z" or a$>"9" and a$<"a" then240
  65. 460 print a$;:sys 52087
  66. 470 if tg=0 then gosub690
  67. 480 if tg=1 then gosub1310
  68. 490 gosub520:goto240
  69. 500 :
  70. 510 rem find crsr
  71. 520 poke 783,peek(783) or 1:sys 65520:r=peek(781):c=peek(782):return
  72. 530 :
  73. 540 rem flash crsr
  74. 550 gosub520:a=((r*40)+(c+1024)-0):b=peek(a)
  75. 560 b=(b or 128) and not (b and 128)
  76. 570 poke a,b:return
  77. 580 :
  78. 590 rem put crsr
  79. 600 poke 781,r:poke 782,c:poke783,peek(783) and 254:sys 65520:return
  80. 610 :
  81. 620 rem get char
  82. 630 p=peek((r*40)+(c+1024)):return
  83. 640 :
  84. 650 rem print puzzle
  85. 660 sys 50522:return
  86. 670 :
  87. 680 rem board limits
  88. 690 if a$="?" then gosub810:   goto720
  89. 700 gosub520:gosub630:if p=32 then rr=12:gosub2250:gosub2460
  90. 710 gosub520:gosub630:if p=93 then rr=12:gosub2250:c=c-1:gosub600
  91. 720 return
  92. 730 :
  93. 740 rem crsr left
  94. 750 gosub990:if peek(cp-1)=32 and peek(cp-2)=93  then c=c+1
  95. 760 c=c-1:gosub600:gosub1140:   gosub520:gosub630:if p=32 then c=c-1:gosub600
  96. 770 gosub520:gosub630:if p=93 then c=c+1:gosub600
  97. 780 return
  98. 790 :
  99. 800 rem crsr right
  100. 810 c=c+1:gosub600
  101. 820 gosub1080:gosub520:gosub630:if p=32 then c=c+1:gosub600
  102. 830 gosub520:gosub630:if p=93 then c=c-1:gosub600
  103. 840 return
  104. 850 :
  105. 860 rem crsr down
  106. 870 r=r+1:gosub600
  107. 880 gosub1200:gosub520:gosub630:if p=32 then r=r+1:gosub600
  108. 890 gosub520:gosub630:if p=64 then r=r-1:gosub600
  109. 900 return
  110. 910 :
  111. 920 rem crsr up
  112. 930 r=r-1:gosub600
  113. 940 gosub1260:gosub520:gosub630:if p=32 then r=r-1:gosub600
  114. 950 gosub520:gosub630:if p=64 then r=r+1:gosub600
  115. 960 return
  116. 970 :
  117. 980 rem crsr address
  118. 990 cp=((r*40)+(c+1024)):return
  119. 1000 :
  120. 1010 rem check for print rt spaces
  121. 1020 sc=0
  122. 1030 gosub990:if peek(cp+1)=32 then sc=sc+1:c=c+1:gosub600:goto1030
  123. 1040 gosub630:if p=32 and peek(cp+1)=93 then c=c-sc:gosub600
  124. 1050 return
  125. 1060 :
  126. 1070 rem check for crsr rt spaces
  127. 1080 sc=0:p=0
  128. 1090 gosub990:if peek(cp)=32 then sc=sc+1:c=c+1:gosub600:goto1090
  129. 1100 gosub630:if p=93 and peek(cp-1)=32 then c=c-1-sc:gosub600
  130. 1110 return
  131. 1120 :
  132. 1130 rem check for crsr lf spaces
  133. 1140 sc=0:p=0
  134. 1150 gosub990:if peek(cp)=32 then sc=sc-1:c=c-1:gosub600:goto1090
  135. 1160 gosub630:if p=93 and peek(cp+1)=32 then c=c+1+sc:gosub600
  136. 1170 return
  137. 1180 :
  138. 1190 rem check for crsr dn spaces
  139. 1200 sc=0:p=0
  140. 1210 gosub990:if peek(cp)=32 then sc=sc+1:r=r+1:gosub600:goto1210
  141. 1220 gosub630:if p=64 and peek(cp-40)=32 then r=r-1-sc:gosub600
  142. 1230 return
  143. 1240 :
  144. 1250 rem check for crsr up spaces
  145. 1260 sc=0:p=0
  146. 1270 gosub990:if peek(cp)=32 then sc=sc+1:r=r-1:gosub600:goto1270
  147. 1280 gosub630:if p=64 and peek(cp+40)=32 then r=r+1+sc:gosub600
  148. 1290 return
  149. 1292 :
  150. 1300 rem check for crsr up or down
  151. 1310 if a$="?" then gosub520:c=c-1:r=r+1:gosub600:goto1330
  152. 1320 gosub520:c=c-1:r=r+1:gosub600:gosub990:p=peek(cp):if p=32 orp=64then gosub2570
  153. 1330 gosub880:return
  154. 1340 rem get filename
  155. 1350 f$="fil"+str$(peek(767)):return
  156. 1360 :
  157. 1370 rem save current puzzle
  158. 1380 gosub1350:open15,dv,15,"s0:"+f$:close15
  159. 1382 sys57812f$,dv:poke193,0:poke194,4:poke174,232:poke175,7
  160. 1390 sys62954:return
  161. 1400 :
  162. 1410 rem load old puzzle
  163. 1420 poke53265,11:gosub1350:open 8,dv,8,+f$+",p,r":poke780,.:sys65493:close8
  164. 1430 if st<>64 then open 8,dv,15,"i":close8
  165. 1440 sys 51424:poke 53265,27:return
  166. 1450 :
  167. 1460 rem print list
  168. 1470 sys50812:gosub2830:return
  169. 1480 :
  170. 1490 rem save search word
  171. 1500 if peek(766)=0 and tg=0 then rr=12:goto2670
  172. 1510 if peek(766)=1 and tg=0 then rr=14:goto2670
  173. 1520 if peek(766)=0 and tg=1 then:rr=12:goto2750
  174. 1530 if peek(766)=1 and tg=1 then:rr=14:goto2750
  175. 1540 stop
  176. 1550 :
  177. 1560 rem search screen list
  178. 1570 sys 830
  179. 1580 sys 851
  180. 1590 a=peek(680)+peek(681)*256
  181. 1600 b=peek(682)+peek(683)*256
  182. 1610 if b=2024 then return
  183. 1620 for x=0 to 20
  184. 1630 if peek(b+x)=peek(a+x) then next
  185. 1640 if peek(a+x)=0 then1660
  186. 1650 b=b+1:q=b:gosub1870:poke682,lb:poke683,h%:goto1580
  187. 1660 if peek(b+x)<129 then1680
  188. 1670 goto1650
  189. 1680 if peek(b-1)<129 then1700
  190. 1690 goto1650
  191. 1700 if peek(b-1)=122 then return
  192. 1710 if peek(b-1)<> 32 then1600
  193. 1720 return
  194. 1730 :
  195. 1740 rem delete word
  196. 1750 for x=740to760:pokex,255:next:rem clr word buffer
  197. 1760 :
  198. 1770 r2=r:c2=c:r5=r:c5=c:rem save crsr position
  199. 1790 :
  200. 1800 gosub1500
  201. 1810 if b=2024 then r=r5:c=c5:gosub2410:goto1840
  202. 1820 if peek(766)=0 then poke b-1+54272,0:poke b-1,122:r=12:gosub2050
  203. 1830 if peek(766)=1 then poke b-1+54272,0:poke b-1,32:r=1:gosub2050
  204. 1840 c=c2:r=r2:gosub600:return
  205. 1850 :
  206. 1860 rem calc addr bytes
  207. 1870 h%=q/256:lb=q-h%*256:return
  208. 1880 :
  209. 1890 rem display menu
  210. 1900 sys 51015:rem save board
  211. 1910 poke 53265,11:sys 51921:sys 51288:poke 53265,27:rem display menu
  212. 1920 get s$
  213. 1930 if s$=chr$ (137) then1950
  214. 1940 goto1920
  215. 1950 poke53265,11:sys 51151:gosub2830:sys51424:poke53265,27
  216. 1960 return
  217. 1970 rem end routine
  218. 1980 print"solve another puzzle? (y/n)":poke 646,peek(53281)
  219. 1990 get a$:if a$="" then1990
  220. 2000 if a$="n" then 3090
  221. 2010 if a$="y" then print chr$(147):goto 70
  222. 2020 goto1990
  223. 2040 :
  224. 2050 o=b:p=0
  225. 2060 q=peek(o)
  226. 2070 if q=122 then2130
  227. 2080 if q=32  then2130
  228. 2090 p=p+1
  229. 2100 o=o+1:if o=2024 then return
  230. 2110 goto2060
  231. 2120 rem color word
  232. 2130 for s=b to b+p-1:poke s+54272,rr:next:return
  233. 2140 rem find and color all marks
  234. 2150 o=1119
  235. 2160 q=peek(o)
  236. 2170 if q=122 then poke o+54272,1:o=o+1:goto2200
  237. 2180 o=o+1:if o=2024 then return
  238. 2190 goto2160
  239. 2200 b=o:p=0:r=12
  240. 2210 gosub2060
  241. 2220 if o<>2024 then2160
  242. 2230 return
  243. 2240 rem get letter count
  244. 2250 e=(r*40)+(c+1024):q=e-1:ee=q:l=0
  245. 2260 if peek(q)=93 then2310
  246. 2270 if peek(q)=32 then2310
  247. 2280 l=l+1:q=q-1:goto2260
  248. 2290 :
  249. 2300 rem put word in buffer
  250. 2310 i=740:for s=e-l to e-1:poke i,peek(s)+128:i=i+1:next:l=l-1:poke i,0
  251. 2330 :
  252. 2340 c9=c:r9=r:gosub1570
  253. 2350 if b=2024 then gosub2410:goto2380
  254. 2360 poke b-1+54272,0:poke b-1,122
  255. 2370 gosub2050
  256. 2380 c=c9:r=r9:gosub600:return
  257. 2390 :
  258. 2400 rem word not in list error
  259. 2410 i=50975:for x=1024 to1063:q=peek(x):poke i,q:i=i+1:next
  260. 2420 r2=r:c2=c:poke781,0:sys59903:r=0:c=1:gosub600
  261. 2430 print" word*not*in*list!! [156]hitanykeytocont[146]"
  262. 2440 gosub2920:get s$:if s$="" then2440
  263. 2450 gosub2950:return
  264. 2460 gosub990:if peek(cp)=32 and peek(cp+1)=93 then c=c-1:gosub600:return
  265. 2470 :sc=0:if peek(cp+1)=32 then sc=0:goto2510
  266. 2480 c=c+1:gosub600:return
  267. 2500 :
  268. 2510 gosub990:if peek(cp+1)=32 then sc=sc+1:c=c+1:gosub600:goto2510
  269. 2520 gosub630:if p=32 and peek(cp+1)=93 then c=c-sc-1:gosub600:return
  270. 2530 if p=32 and peek(cp+1)=63 then2480
  271. 2540 return
  272. 2550 :
  273. 2560 rem get u/d word
  274. 2570 rr=12:gosub520:e=(r*40)+(c+1024):q=e-40:l=0
  275. 2580 if peek(q)=64 then2630
  276. 2590 if peek(q)=32 then2630
  277. 2600 l=l+1:q=q-40:goto2580
  278. 2610 :
  279. 2620 rem put word in buffer
  280. 2630 i=740:for s=e-l*40 to e-40 step40:poke i,peek(s)+128:i=i+1:next:l=l-1
  281. 2640 pokei,0:gosub2340:return
  282. 2650 :
  283. 2670 i=740:gosub520:e=r*40+c+1024:ee=e
  284. 2680 q=peek(e)
  285. 2690 if q=32 or q=93 then poke i,0:gosub1570:return
  286. 2700 rem if peek(766)=1 then poke e,63
  287. 2710 poke i,q+128
  288. 2720 i=i+1:e=e+1
  289. 2730 goto2680
  290. 2740 :
  291. 2750 i=740:gosub520:e=r*40+c+1024:ee=e
  292. 2760 q=peek(e)
  293. 2770 if q=32 or q=64 then poke i,0:gosub1570:return
  294. 2780 poke i,q+128
  295. 2790 i=i+1:e=e+40
  296. 2800 goto2760
  297. 2810 :
  298. 2820 rem set word list color
  299. 2830 poke714,14:poke715,0:sys 52003
  300. 2840 :
  301. 2850 rem set grid color
  302. 2860 poke12406,40:poke12408,4:poke12463,1:poke12492,15:poke12554,16:sys12405
  303. 2870 :
  304. 2880 rem set help color
  305. 2890 poke12406,72:poke12408,7:poke12463,2:poke12492,16:poke12554,4:sys12405
  306. 2900 :return
  307. 2910 rem error buzzer
  308. 2920 poke54296,15:poke54277,45:poke54278,165
  309. 2930 poke54276,33:poke54273,6:poke54272,5
  310. 2940 fort=1to200:next:poke54276,32:poke54273,.:poke54272,.:return
  311. 2950 sys12288:c=c2:r=r2:return:rem return top line
  312. 2960 :
  313. 2970 rem display solution
  314. 2980 if dg=0 then3030
  315. 2990 if dg=1 then3060
  316. 3000 stop
  317. 3010 :
  318. 3020 rem return puzzle
  319. 3030 poke 53265,11:sys 51151:gosub2830:sys51424:poke53265,27:return
  320. 3040 :
  321. 3050 rem display solution
  322. 3060 sys51015:poke698,225:poke 699,192:sys50522:return
  323. 3070 stop
  324. 3080 :
  325. 10000 dv=peek(186):n$="blanks":open15,dv,15,"s0:"+n$:close15:saven$,dv:end
  326. 40000 fori=0to21:poke828+i,8+i:next
  327. 40010 ifdv<8ordv>29ordv=8then40030
  328. 40020 a=peek(828):b=peek(828+dv-8):poke828,b:poke828+dv-8,a
  329. 40030 a$="hello connect":forj=8to29:i=peek(828+j-8):ifi=14thennext
  330. 40040 close2:open2,i,2:close2:ifstthen40060
  331. 40050 close15:open15,i,15,"r0:"+a$+"="+a$:input#15,er:close15:ifer=63then40070
  332. 40060 next:print"[147]":poke53272,23:poke186,8:end
  333. 40070 q$=chr$(34):poke646,peek(53281):print"[147]":poke53272,23
  334. 40080 print"[147]p[207]2048,0:p[207]44,8:p[207]43,1:p[207]56,160:p[207]55,0:clr:l[207]"q$a$q$","i
  335. 40090 print"run:":poke631,13:poke632,13:poke198,2:end
  336.