home *** CD-ROM | disk | FTP | other *** search
/ Commodore Disk User Volume 3 #1 / Commodore_Disk_User_Vol.3_1_1989_-.d64 / design (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  8KB  |  411 lines

  1. 100 poke 52,112:poke 56,112:clr
  2. 110 (NULL) "[201]nit"
  3. 120 (NULL) "[197]xec"
  4. 130 (NULL) "[211]hut[196]own"
  5. 140 end
  6. 150 :
  7. 160 (NULL) "[201]nit"
  8. 170 (NULL)
  9. 180 d=0
  10. 190 p=2
  11. 200 dv=8
  12. 210 (NULL) 1,clr
  13. 220 (NULL) (NULL) 1,clr
  14. 230 (NULL) 1 def 40,1,16+6
  15. 240 (NULL) 2 def 21,15,6+1
  16. 250 (NULL) 4 def 30,6,16+2
  17. 260 (NULL) def 1,1
  18. 270 (NULL) (NULL) 100,100
  19. 280 (NULL) (NULL) d,p
  20. 290 (NULL) 4,0
  21. 300 (NULL) def 256,0,0,0,0,0,0,0,0
  22. 310 cg=0
  23. 320 dim ac(15),sp(8),ch(8,8)
  24. 330 restore
  25. 340 for i=0 to 15
  26. 350 read ac(i)
  27. 360 next
  28. 370 bc=5:fc=144
  29. 380 (NULL) "[211]pr[196]ef"
  30. 390 return
  31. 400 data 144,5,28,159,156,30,31,158,129,149,150,151,152,153,154,155
  32. 410 :
  33. 420 (NULL) "[197]xec"
  34. 430 (NULL) 1 open 0,0
  35. 440 (NULL) (NULL) 1,1
  36. 450 print "[147][196]esign  [211]ystem";
  37. 460 te=0:se=0
  38. 470 (NULL)
  39. 480 : (NULL) se<>0 then (NULL) 1 (NULL):print "[147][196]esign  [211]ystem";
  40. 490 : (NULL):(NULL) (NULL)(1)
  41. 500 : px=int((NULL)(0)/8)
  42. 510 : (NULL) px<=6 then (NULL) "[196]esign[211]ervice"
  43. 520 : (NULL) px>=8 and px<=13 then (NULL) "[211]ys[211]ervice"
  44. 530 (NULL) te<>0
  45. 540 (NULL) (NULL) 0
  46. 550 (NULL) 1 close
  47. 560 return
  48. 570 :
  49. 580 (NULL) "[211]hut[196]own"
  50. 590 (NULL) (NULL) 0
  51. 600 (NULL) 4 clr
  52. 610 (NULL) 2 clr
  53. 620 (NULL) 1 clr
  54. 630 (NULL) (NULL) 0
  55. 640 (NULL) 0
  56. 650 (NULL)
  57. 660 print chr$(142);"program finished"
  58. 670 return
  59. 680 :
  60. 690 (NULL) "[196]esign[211]ervice"
  61. 700 (NULL) 3 def 18,1,16+6
  62. 710 (NULL) 3 open 0,1
  63. 720 print "[196]esign [195]haracters";
  64. 730 (NULL) "[205][211]elect"
  65. 740 (NULL) se (NULL) "[195]har[196]es"
  66. 750 (NULL) se=0 then (NULL) 3 close:(NULL) 3 clr
  67. 760 return
  68. 770 :
  69. 780 (NULL) "[211]ys[211]ervice"
  70. 790 (NULL) 3 def 22,1,16+6
  71. 800 (NULL) 3 open 8,1
  72. 810 print "[197]xit to [194]asic [211]ystem";
  73. 820 (NULL) "[205][211]elect"
  74. 830 b=0
  75. 840 (NULL) se<>0 then op$="[197]xit to [194]asic [211]ystem":(NULL) "[195]onfirm"
  76. 850 te=b
  77. 860 (NULL) 3 close
  78. 870 (NULL) 3 clr
  79. 880 return
  80. 890 :
  81. 900 (NULL) "[205][211]elect"
  82. 910 se=0
  83. 920 (NULL)
  84. 930 (NULL) (NULL)(3) and ((NULL)(p)=128 or (NULL)(p)=16) then se=int((NULL)(1)/8)+1
  85. 940 (NULL) (NULL) se=0 and ((NULL)(3) or (NULL)(1))
  86. 950 return
  87. 960 :
  88. 970 (NULL) "[195]onfirm"
  89. 980 ow=(NULL)(0)
  90. 990 (NULL) 4 open 5,9
  91. 1000 print "            ![211][212][207][208]!"
  92. 1010 print (NULL)((30-len(op$))/2,32);op$
  93. 1020 print "   [208]ress [194]utton [212]o [195]onfirm"
  94. 1030 print "     [200]it [210]eturn to [195]ancel"
  95. 1040 (NULL) "[203]ey[211]witch"
  96. 1050 (NULL) 4 close
  97. 1060 (NULL) ow (NULL)
  98. 1070 return
  99. 1080 :
  100. 1090 (NULL) "[203]ey[211]witch"
  101. 1100 (NULL)
  102. 1110 a=(NULL)(0)
  103. 1120 b=(NULL)(p):c=(NULL)(p):(NULL) c=16 then b=128
  104. 1130 (NULL) a=13 or b=128
  105. 1140 return
  106. 1150 :
  107. 1160 (NULL) "[195]har[196]es"
  108. 1170 (NULL) 3 close
  109. 1180 (NULL) 3 clr
  110. 1190 (NULL) 1 (NULL)
  111. 1200 print "[147][207]ptions    [195]haracters";
  112. 1210 (NULL) "[195]har[199]rid"
  113. 1220 tc=0
  114. 1230 (NULL)
  115. 1240 (NULL) not((NULL)(2)) then (NULL) 4,0
  116. 1250 (NULL) (NULL)(2) then (NULL) "[195]heck[199]rid"
  117. 1260 (NULL) (NULL)(1) then (NULL) "[195]heck[200]eader"
  118. 1270 (NULL) (NULL) tc
  119. 1280 (NULL) 2 close
  120. 1290 return
  121. 1300 :
  122. 1310 (NULL) "[195]har[199]rid"
  123. 1320 (NULL) 2 open 10,5
  124. 1330 (NULL) 1,0:(NULL) 2,1:(NULL)
  125. 1340 (NULL) "[195]lr[199]rid"
  126. 1350 (NULL) 11,3:print "[195]har =";
  127. 1360 (NULL) 11,4:print "[193]scii=";cd%;
  128. 1370 (NULL) 11,5:print "[210]ev  = ";rv$;
  129. 1380 (NULL) 11,6:print "[211]et  =";se%;
  130. 1390 (NULL) 1,13:print "[156][198]ile:[146]";
  131. 1400 return
  132. 1410 :
  133. 1420 (NULL) "[195]heck[199]rid"
  134. 1430 px=int((NULL)(0)/8):py=int((NULL)(1)/8)
  135. 1440 (NULL) px<2 or px>9 or py<2 or py>9 then (NULL) 4,6:return
  136. 1450 (NULL) 4,4
  137. 1460 (NULL) ((NULL)(p)<>128 and (NULL)(p)<>16) then return
  138. 1470 ax=px-1:ay=py-1
  139. 1480 m=2^(8-ax)
  140. 1490 fg=not(ch(ax,ay))
  141. 1500 (NULL) fg then sp(ay)=sp(ay)or m
  142. 1510 (NULL) not(fg) then sp(ay)=sp(ay) and (255-m)
  143. 1520 ch(ax,ay)=fg
  144. 1530 ch$="[207]"
  145. 1540 (NULL) ch(px-1,py-1) then ch$=" [146]"
  146. 1550 (NULL) px,py:print chr$(142);"[144]";ch$;"";
  147. 1560 (NULL) "[213]p[196]ate"
  148. 1570 return
  149. 1580 :
  150. 1590 (NULL) "[195]heck[200]eader"
  151. 1600 px=int((NULL)(0)/8)
  152. 1610 (NULL) px>=0 and px<=6 then (NULL) "[196]o[207]ption"
  153. 1620 (NULL) px>=11 and px<=20 then (NULL) "[196]o[195]haracter"
  154. 1630 return
  155. 1640 :
  156. 1650 (NULL) "[196]o[195]haracter"
  157. 1660 ow=(NULL)(0)
  158. 1670 (NULL) 3 def 10,6,22
  159. 1680 (NULL) 3 open 11,1
  160. 1690 print "[211]elect    [198]lip      [210]everse   [195]lear     [195]olour    [213]pdate";
  161. 1700 (NULL) "[205][211]elect"
  162. 1710 (NULL) 3 close
  163. 1720 (NULL) 3 clr
  164. 1730 (NULL) ow (NULL)
  165. 1740 (NULL) se<>5 and se<>0 then (NULL) "[194]usy"
  166. 1750 (NULL) se (NULL) "[211]el[195]har","[198]lip","[210]everse","[195]lear[195]","[195]olour","[211]ave[195][195]"
  167. 1760 (NULL) se<>5 and se<>0 then (NULL) "[206]ot[194]usy"
  168. 1770 return
  169. 1780 :
  170. 1790 (NULL) "[196]o[207]ption"
  171. 1800 ow=(NULL)(0)
  172. 1810 (NULL) 3 def 20,3,22
  173. 1820 (NULL) 3 open 0,1
  174. 1830 print "[204]oad [195]haracter [198]ile [211]ave [195]haracter  [198]ile[197]xit";
  175. 1840 (NULL) "[205][211]elect"
  176. 1850 (NULL) 3 close
  177. 1860 (NULL) 3 clr
  178. 1870 (NULL) ow (NULL)
  179. 1880 (NULL) se (NULL) "[204]oad[195][211]et","[211]ave[195][211]et","[195][197]xit"
  180. 1890 return
  181. 1900 :
  182. 1910 (NULL) "[195][197]xit"
  183. 1920 (NULL) "[211]ave[195][195]"
  184. 1930 tc=-1
  185. 1940 return
  186. 1950 :
  187. 1960 (NULL) "[213]p[196]ate"
  188. 1970 (NULL) def 256,sp(1),sp(2),sp(3),sp(4),sp(5),sp(6),sp(7),sp(8)
  189. 1980 (NULL) 18,3:printchr$(1);chr$(bc);chr$(fc);"@";
  190. 1990 return
  191. 2000 :
  192. 2010 (NULL) "[199][213]p[196]ate"
  193. 2020 (NULL) "[195]lr[199]rid"
  194. 2030 for y=1 to 8
  195. 2040 for x=1 to 8
  196. 2050 ch(x,y)=0
  197. 2060 (NULL) (sp(y) and 2^(8-x))<>0 then ch(x,y)=-1:(NULL) 1+x,1+y:print "[144] [146]";
  198. 2070 next x,y
  199. 2080 return
  200. 2090 :
  201. 2100 (NULL) "[198]lip"
  202. 2110 for y=1 to 4
  203. 2120 tp=sp(y)
  204. 2130 sp(y)=sp(9-y)
  205. 2140 sp(9-y)=tp
  206. 2150 next
  207. 2160 (NULL) "[199][213]p[196]ate"
  208. 2170 (NULL) "[213]p[196]ate"
  209. 2180 return
  210. 2190 :
  211. 2200 (NULL) "[195]lr[199]rid"
  212. 2210 print chr$(142);"[144]";
  213. 2220 for y=0 to 7
  214. 2230 (NULL) 2,2+y
  215. 2240 print "[207][207][207][207][207][207][207][207][180]"
  216. 2250 next
  217. 2260 print "[183][183][183][183][183][183][183][183]"
  218. 2270 return
  219. 2280 :
  220. 2290 (NULL) "[210]everse"
  221. 2300 for y=1 to 8
  222. 2310 sp(y)=255-sp(y)
  223. 2320 next y
  224. 2330 (NULL) "[199][213]p[196]ate"
  225. 2340 (NULL) "[213]p[196]ate"
  226. 2350 return
  227. 2360 :
  228. 2370 (NULL) "[195]lear[195]"
  229. 2380 for y=1 to 8
  230. 2390 sp(y)=0
  231. 2400 next y
  232. 2410 (NULL) "[199][213]p[196]ate"
  233. 2420 (NULL) "[213]p[196]ate"
  234. 2430 return
  235. 2440 :
  236. 2450 (NULL) "[195]olour"
  237. 2460 (NULL) 4 open 5,15
  238. 2470 (NULL) 2,6:(NULL)
  239. 2480 (NULL) 6,1
  240. 2490 print "[144]   [159] [156]   [158] [129] [149] [150] [151] [152] [153] [154] [155] [146]";
  241. 2500 cx=0:cc=0
  242. 2510 (NULL) "[194]col"
  243. 2520 (NULL)
  244. 2530 (NULL) (NULL)(4) and ((NULL)(p)=128 or (NULL)(p)=16) then (NULL) "[211]el[195]olour"
  245. 2540 (NULL) 6,4:print chr$(fc);"  [146]";
  246. 2550 (NULL) 18,4:print chr$(bc);"  [146]";
  247. 2560 (NULL) (NULL) cx<>0
  248. 2570 (NULL) 4 close
  249. 2580 (NULL) 2 (NULL)
  250. 2590 (NULL) 18,3:printchr$(1);chr$(bc);chr$(fc);"@";
  251. 2600 return
  252. 2610 :
  253. 2620 (NULL) "[211]el[195]olour"
  254. 2630 px=int((NULL)(0)/8):py=int((NULL)(1)/8)
  255. 2640 (NULL) py=3 and px>=2 and px<=11 then cc=1:(NULL) "[194]col":return
  256. 2650 (NULL) py=3 and px>=14 and px<=23 then cc=2:(NULL) "[194]col":return
  257. 2660 (NULL) py=3 and (px=26 or px=27) then cx=-1:return
  258. 2670 (NULL) py=1 and px>=6 and px<=20 then sc=px-6
  259. 2680 (NULL) cc=2 then bc=ac(sc)
  260. 2690 (NULL) cc=1 then fc=ac(sc)
  261. 2700 return
  262. 2710 :
  263. 2720 (NULL) "[194]col"
  264. 2730 (NULL) 2,3
  265. 2740 print "[198]oreground  [155][194]ackground  [155][207][203][146]";
  266. 2750 (NULL) 2,3
  267. 2760 (NULL) cc=1 then print "[198]oreground  [155][194]ackground  [155][207][203][146]";
  268. 2770 (NULL) cc=2 then print "[155][198]oreground  [194]ackground  [155][207][203][146]";
  269. 2780 return
  270. 2790 :
  271. 2800 (NULL) "[211]el[195]har"
  272. 2810 (NULL) 4 open 5,10
  273. 2820 print "[150][147]   [195]haracter [197]dit [211]election"
  274. 2830 (NULL) ci% then (NULL) "[199]ot[193][195]har"
  275. 2840 (NULL) ci% then (NULL) 4 close:return
  276. 2850 (NULL)
  277. 2860 ba%=0
  278. 2870 (NULL) 2,2:input "[197]nter [193]scii (0-255):    [157][157][157][157]";cd%
  279. 2880 (NULL) cd%<32 or (cd%>=128 and cd%<160) then ba%=-1
  280. 2890 (NULL) (NULL) ba%
  281. 2900 (NULL)
  282. 2910 (NULL) 2,3:input "[197]nter [211]et (1 or 2) :    [157][157][157][157]";se%
  283. 2920 (NULL) (NULL) se%<>1 and se%<>2
  284. 2930 (NULL)
  285. 2940 (NULL) 2,4:input "[210]everse on ([217]/[206])   :    [157][157][157][157]";rv$
  286. 2950 (NULL) (NULL) rv$<>"y" and rv$<>"n"
  287. 2960 (NULL) 4 close
  288. 2970 ci%=-1
  289. 2980 (NULL) 2 (NULL)
  290. 2990 (NULL) 11,4:print "[193]scii=";cd%;
  291. 3000 (NULL) 11,5:print "[210]ev  = ";rv$;
  292. 3010 (NULL) 11,6:print "[211]et  =";se%;
  293. 3020 (NULL) "[204]oad[213]p[195]har"
  294. 3030 return
  295. 3040 :
  296. 3050 (NULL) "[199]ot[193][195]har"
  297. 3060 (NULL) "[211]ave[195][195]"
  298. 3070 (NULL) 2,2:print "[217]ou are already editing"
  299. 3080 print "  [195]haracter";cd%;"in set";se%
  300. 3090 print "  [195]haracter has been saved"
  301. 3100 print "  [195]lick to continue";
  302. 3110 (NULL) "[203]ey[211]witch"
  303. 3120 print "[150][147]   [195]haracter [197]dit [211]election"
  304. 3130 ci%=0
  305. 3140 return
  306. 3150 :
  307. 3160 (NULL) "[194]usy"
  308. 3170 poke 53276,255
  309. 3180 (NULL) def 1,3
  310. 3190 (NULL) 20 (NULL) "[211]witch"
  311. 3200 return
  312. 3210 :
  313. 3220 (NULL) "[211]witch"
  314. 3230 (NULL) v% then (NULL) def 1,4
  315. 3240 (NULL) not(v%) then (NULL) def 1,3
  316. 3250 v%=not(v%)
  317. 3260 return
  318. 3270 :
  319. 3280 (NULL) "[206]ot[194]usy"
  320. 3290 (NULL) def 1,1
  321. 3300 (NULL) clr
  322. 3310 poke 53276,0
  323. 3320 return
  324. 3330 :
  325. 3340 (NULL) "[211]ave[195][195]"
  326. 3350 (NULL) ra%<(7*4096) then return
  327. 3360 for i=0 to 7
  328. 3370 poke ra%+i,sp(i+1)
  329. 3380 next
  330. 3390 return
  331. 3400 :
  332. 3410 (NULL) "[204]oad[195][211]et"
  333. 3420 (NULL) 4 open 5,10
  334. 3430 print "[147]   [195]haracter [211]et [198]ile [204]oad"
  335. 3440 ui%=0:(NULL) "[211]ave[195][195]"
  336. 3450 ci%=0
  337. 3460 (NULL)
  338. 3470 (NULL) 2,2:input "[198]ile:";cf$
  339. 3480 (NULL) (NULL) cf$=""
  340. 3490 poke 780,1:poke 781,dv:poke 782,0:sys 65466
  341. 3500 for i=1 to len(cf$):poke 999+i,asc(mid$(cf$,i,1)):next
  342. 3510 poke 780,len(cf$):poke 781,232:poke 782,3:sys 65469
  343. 3520 poke 780,0:poke 781,0:poke 782,112:sys 65493
  344. 3530 (NULL) dv>8 then df=val((NULL)(dv))
  345. 3540 (NULL) df<>0 or (st and (255-64))<>0 then (NULL) "[196]isk[204]oad[197]rr"
  346. 3550 (NULL) 4 close
  347. 3560 (NULL) 2 (NULL)
  348. 3570 (NULL) not ui% then (NULL) 1,13:print "[156][198]ile:[146]";cf$
  349. 3580 return
  350. 3590 :
  351. 3600 (NULL) "[196]isk[204]oad[197]rr"
  352. 3610 (NULL) 2,4:print "[208]roblem loading [198]ile. "
  353. 3620 (NULL) 2,5:print "[208]ress button to [195]ontinue"
  354. 3630 ui%=-1
  355. 3640 (NULL) "[203]ey[211]witch"
  356. 3650 return
  357. 3660 :
  358. 3670 (NULL) "[204]oad[213]p[195]har"
  359. 3680 ra%=cd%
  360. 3690 (NULL) (cd%>=64 and cd%<=95) or (cd%>=160 and cd%<=191) then ra%=cd%-64
  361. 3700 (NULL) (cd%>=96 and cd%<=127) then ra%=cd%-32
  362. 3710 (NULL) se%=2 then ra%=ra%+256
  363. 3720 (NULL) rv$="y" then ra%=ra%+128
  364. 3730 ra%=28672+ra%*8
  365. 3740 for i=0 to 7
  366. 3750 sp(i+1)=peek(ra%+i)
  367. 3760 next i
  368. 3770 (NULL) "[199][213]p[196]ate"
  369. 3780 (NULL) "[213]p[196]ate"
  370. 3790 return
  371. 3800 :
  372. 3810 (NULL) "[211]ave[195][211]et"
  373. 3820 (NULL) 4 open 5,10
  374. 3830 print "[147]   [195]haracter [211]et [198]ile [211]ave"
  375. 3840 ui%=0
  376. 3850 (NULL)
  377. 3860 (NULL) 2,2:input "[198]ile:";cf$
  378. 3870 (NULL) (NULL) cf$=""
  379. 3880 (NULL) dv,"s0:"+cf$
  380. 3890 poke 780,1:poke 781,dv:poke 782,0:sys 65466
  381. 3900 for i=1 to len(cf$):poke 999+i,asc(mid$(cf$,i,1)):next
  382. 3910 poke 780,len(cf$):poke 781,232:poke 782,3:sys 65469
  383. 3920 poke 253,0:poke 254,112
  384. 3930 poke 780,253:poke 781,0:poke 782,128:sys 65496
  385. 3940 (NULL) dv>8 then df=val((NULL)(dv))
  386. 3950 (NULL) df<>0 or (st and (255-64))<>0 then (NULL) "[194]ad[211]ave"
  387. 3960 (NULL) 4 close
  388. 3970 (NULL) 2 (NULL)
  389. 3980 return
  390. 3990 :
  391. 4000 (NULL) "[194]ad[211]ave"
  392. 4010 (NULL) 2,4:print "[208]roblem saving [198]ile. "
  393. 4020 (NULL) 2,5:print "[208]ress button to [195]ontinue"
  394. 4030 (NULL) "[203]ey[211]witch"
  395. 4040 return
  396. 4050 :
  397. 4060 (NULL) "[211]pr[196]ef"
  398. 4070 for i=0 to 127
  399. 4080 read y
  400. 4090 poke 52736+i,y
  401. 4100 next i
  402. 4110 return
  403. 4120 data 64,0,1,16,170,4,6,170,144,10,170,160,42,170,168,41,105,104,169,235,106
  404. 4130 data169,235,106,169,235,106,170,170,170,170,170,170,170,170,170,170,170,170
  405. 4140 data166,170,154,169,85,106,170,85,170,42,170,168,10,170,160,5,0,64,0,0,64
  406. 4150 data0,0,80,0
  407. 4160 data2,0,128,12,170,32,6,170,144,10,170,160,42,170,168,41,105,104,169,235,106
  408. 4170 data169,235,106,169,235,106,170,170,170,170,170,170,170,170,170,170,170,170
  409. 4180 data 166,170,154,169,85,106,170,85,170,42,170,168,10,170,160,1,0,80,1,0,0
  410. 4190 data 5,0,0,0
  411.