home *** CD-ROM | disk | FTP | other *** search
/ Commodore Disc 51 / Commodore_Disc_51_19xx_-_de.d64 / main (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  10KB  |  312 lines

  1. 10 rem rezeptmanager.main======64
  2. 20 rem (p) commodore disc      ==
  3. 30 rem ==========================
  4. 40 rem (c) by                  ==
  5. 50 rem     jens wellhausen     ==
  6. 60 rem     martin radetzki     ==
  7. 70 rem version 2.0   40z./ascii==
  8. 80 rem  c-64  floppy           ==
  9. 90 rem ==========================
  10. 95 gosub 60000
  11. 100 ifx=1thenx=2
  12. 110 ifx=2then320
  13. 120 poke53280,14:poke53281,14:printcl$sl$dc$bl$:poke56295,6
  14. 130 mn$(1)=" [204][193][196][197][206] ":mn$(2)=" [211][208][197][201][195][200][197][210][206] ":mn$(3)=" [211][195][200][210][197][201][194][197][206] ":mn$(4)=" [196][210][213][195][203] "
  15. 140 mn$(5)=" [196][201][197][206][211][212] "
  16. 150 mm$(1)=z0$+"[204][193][196][197][206]"+rn$+z0$+rf$:mm$(2)=z0$+"[211][208][197][201][195][200][197][210][206]"+rn$+z0$+rf$
  17. 155 mm$(3)=z0$+"[211][195][200][210][197][201][194][197][206]"+rn$+z0$+rf$
  18. 160 mm$(4)=z0$+"[196][210][213][195][203]"+rn$+z0$+rf$:mm$(5)=z0$+"[196][201][197][206][211][212]"+rn$+z0$+rf$
  19. 170 mn(1)=0:mn(2)=6:mn(3)=16:mn(4)=26:mn(5)=32
  20. 180 data133,95,134,96,76,191,163
  21. 190 fori=828to834:reada:pokei,a:next
  22. 200 dimre$(18)
  23. 210 ud$(1)="[196]isketteninhalt":ud$(2)="[210]ezept loeschen":ud$(3)="[210]ez. umbenennen"
  24. 220 ud$(4)="     [197][206][196][197]      "
  25. 230 dimdi$(150)
  26. 240 printhe$"[210][197][218][197][208][212][205][193][206][193][199][197][210] [214]1.0   (c)'87 by [202].[215] & [205].[210]";
  27. 250 printrn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$;
  28. 255 printzn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$zn$;
  29. 260 print" [204][193][196][197][206]"s2$"[211][208][197][201][195][200][197][210][206]"s2$"[211][195][200][210][197][201][194][197][206]"s2$"[196][210][213][195][203]"s2$"[196][201][197][206][211][212] ";
  30. 270 printz1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$;
  31. 275 printz1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$z1$rf$;
  32. 280 printzf$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$;
  33. 285 printzv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zd$;
  34. 290 fori=1to19:printyo$"                                      "yo$;:next
  35. 300 printzc$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$;
  36. 305 printzv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$zv$;:poke2023,125
  37. 310 gosub2500:x=1:goto100
  38. 320 poke198,0:al=1:mp=1:poke214,2:poke211,mn(mp):sys58640:printmm$(mp)
  39. 330 geti$
  40. 340 ifi$=c3$thenmp=mp+1:goto380
  41. 350 ifi$=c1$thenmp=mp-1:goto380
  42. 360 ifi$=chr$(13)then430
  43. 370 goto330
  44. 380 ifmp=0thenmp=1:goto330
  45. 390 ifmp=6thenmp=5:goto330
  46. 400 poke214,2:poke211,mn(al):sys58640:printrn$;mn$(al);rf$;
  47. 410 poke214,2:poke211,mn(mp):sys58640:printmm$(mp);
  48. 420 al=mp:goto330
  49. 430 poke214,2:poke211,mn(al):sys58640:printrn$;mn$(al)
  50. 440 onmpgoto450,1010,1220,1450,1570
  51. 450 gosub2500
  52. 460 lo=1190:be=50000:s=17:z=14:gosub2540
  53. 470 poke214,7:poke211,7:sys58640:print"[206]ame d. [210]ezepts"
  54. 480 ab=0:i$="":s=7:z=8:l=15:gosub2590:ifab=1thenab=0:gosub2520:goto320
  55. 490 ifi$="               "then630
  56. 500 open15,8,15:open2,8,2,i$+",s,r"
  57. 510 e=0:input#15,e,e$
  58. 520 poke211,7:poke214,10:sys58640:printe$
  59. 530 ife<>0thenpoke198,0:close2:close15:wait198,1:poke198,0:gosub2520:goto320
  60. 540 fori=0to18:re$(i)="":next:fori=0to18:input#2,re$(i):next
  61. 550 close2:close15:gosub2520
  62. 560 na$=i$:s=(37-len(i$))/2:poke211,s-8:poke214,4:sys58640
  63. 570 printzv$zv$zv$zv$zv$zv$zv$zv$rn$" ";na$;" "rf$zv$zv$zv$zv$zv$zv$zv$zv$
  64. 580 fori=0to18
  65. 590 poke214,5+i:poke211,1:sys58640:print"                                     "
  66. 600 poke214,5+i:poke211,1:sys58640:printre$(i)
  67. 610 next
  68. 620 goto320
  69. 630 fori=0to150:di$(i)="":next:open15,8,15,"i"
  70. 640 input#15,e,e$:poke211,7:poke214,10:sys58640:printe$
  71. 650 ife<>0thenpoke198,0:wait198,1:poke198,0:close15:gosub2520:goto320
  72. 660 open2,8,2,"#":sp=18:se=1:y=0
  73. 670 print#15,"u1:";2;0;sp;se:get#2,sp$,se$:sp=asc(sp$+chr$(0))
  74. 680 se=asc(se$+chr$(0))
  75. 690 fori=0to7:print#15,"b-p:";2;2+32*i:get#2,a$:ifa$=""thena$=chr$(0)
  76. 700 ft=asc(a$)and15
  77. 710 ifft<>1then770
  78. 720 get#2,a$,a$
  79. 730 forj=0to15:get#2,a$:ifa$=chr$(160)thenj=15:goto750
  80. 740 di$(y)=di$(y)+a$
  81. 750 nextj
  82. 760 y=y+1
  83. 770 nexti:ifsp=0thenclose2:close15:goto790
  84. 780 goto670
  85. 790 mp=0:pa=0:t=0:poke198,0
  86. 800 fori=0to9:poke214,7+i:poke211,7:sys58640:print"               ":next
  87. 810 fori=0to9:poke214,7+i:poke211,7:sys58640:printdi$(i+pa*10):next
  88. 820 le$="":le=15-len(di$(mp+pa*10)):fori=1tole:le$=le$+" ":next
  89. 830 poke211,7:poke214,7+mp:sys58640:printrn$di$(mp+10*pa)le$rf$:al=mp
  90. 840 geti$
  91. 850 ifi$=c4$thenmp=mp+1:goto900
  92. 860 ifi$=c2$thenmp=mp-1:goto900
  93. 870 ifi$=chr$(13)then960
  94. 880 ifi$="_"thengosub2520:goto320
  95. 890 goto840
  96. 900 ifmp>9thenmp=0:pa=pa+1:t=1
  97. 910 ifmp<0thenmp=9:pa=pa-1:t=1
  98. 920 ifpa<0thenpa=0:mp=0:t=0:goto820
  99. 930 if(mp+pa*10)=ythenmp=mp-1:goto900
  100. 940 ift=1thent=0:goto800
  101. 950 poke214,7+al:poke211,7:sys58640:printdi$(al+pa*10)le$:goto820
  102. 960 i$=di$(mp+pa*10)
  103. 970 fori=0to9:poke214,7+i:poke211,7:sys58640:print"               ":next
  104. 980 poke211,7:poke214,7:sys58640:print"[206]ame d. [210]ezepts"
  105. 990 poke211,7:poke214,8:sys58640:printi$
  106. 1000 goto500
  107. 1010 gosub2500
  108. 1020 lo=1190:be=50240:s=17:z=8:gosub2540
  109. 1030 poke214,7:poke211,7:sys58640:print"[206]ame d. [210]ezepts"
  110. 1040 ab=0:i$=na$:s=7:z=8:l=15:gosub2590:ifab=1thenab=0:gosub2520:goto320
  111. 1050 na$=i$
  112. 1060 open15,8,15:open2,8,2,na$+",s,w"
  113. 1070 e=0:input#15,e,e$
  114. 1080 ife=63then1160
  115. 1090 poke211,7:poke214,10:sys58640:printe$
  116. 1100 ife<>0thenclose2:close15:poke198,0:wait198,1:poke198,0:gosub2520:goto320
  117. 1110 fori=0to18:print#2,chr$(34);re$(i);chr$(34);chr$(13);:next
  118. 1120 close2:close15:gosub2520
  119. 1130 s=(37-len(na$))/2:poke214,4:poke211,s-8:sys58640
  120. 1140 printzv$zv$zv$zv$zv$zv$zv$zv$rn$" ";na$;" "rf$zv$zv$zv$zv$zv$zv$zv$zv$zv$
  121. 1150 goto320
  122. 1160 poke214,10:poke211,7:sys58640:print"ersetzen j/n?"
  123. 1170 i$="":z=10:s=21:l=1:ab=0:gosub2590:ifab=1thenab=0:i$="n"
  124. 1180 ifi$="n"thenclose2:close15:gosub2520:goto320
  125. 1190 ifi$<>"j"then1170
  126. 1200 close2:close15:open15,8,15,"s:"+na$:open2,8,2,na$+",s,w"
  127. 1210 print#15,"s:"+na$:goto1110
  128. 1220 gosub2500
  129. 1230 lo=1190:be=50380:s=17:z=6:gosub2540
  130. 1240 poke214,7:poke211,7:sys58640:print"[206]ame d. [210]ezepts"
  131. 1250 ab=0:i$=na$:s=7:z=8:l=15:gosub2590:ifab=1thenab=0:gosub2520:goto320
  132. 1260 gosub2520
  133. 1270 na$=i$:s=(37-len(na$))/2:poke214,4:poke211,s-8:sys58640
  134. 1280 printzv$zv$zv$zv$zv$zv$zv$zv$rn$" ";na$;" "rf$zv$zv$zv$zv$zv$zv$zv$zv$zv$
  135. 1290 y=0:sp=0
  136. 1300 ify<0theny=0
  137. 1310 ify>18theny=18
  138. 1320 ab=0:i$=re$(y):s=1:z=5+y:l=38:gosub2190
  139. 1330 ifab=0thenre$(y)=i$:y=y+1:sp=0:goto1300
  140. 1340 ifab=1thenre$(y)=i$:goto320
  141. 1350 ifab=2thenre$(y)=i$:y=y+1:goto1300
  142. 1360 ifab=3thenre$(y)=i$:y=y-1:goto1300
  143. 1370 ifab=4thenre$(y)=i$:y=y-1:sp=37:goto1300
  144. 1380 ifab=5thenre$(y)=i$:y=y+1:sp=0:goto1300
  145. 1390 ifab=6thenre$(y)=i$:y=0:sp=0:goto1300
  146. 1400 ifab=7thenre$(y)=i$:y=0:sp=0:goto1410
  147. 1410 fori=0to18
  148. 1420 poke211,1:poke214,i+5:sys58640
  149. 1430 re$(i)="":print"                                      "
  150. 1440 next:goto1300
  151. 1450 gosub2500
  152. 1460 lo=1190:be=50490:s=18:z=8:gosub2540
  153. 1470 poke198,0:wait198,1:geti$:poke198,0:ifi$="_"thengosub2520:goto320
  154. 1480 fori=7to10:poke211,7:poke214,i:sys58640:print"                ":next
  155. 1490 poke211,7:poke214,7:sys58640:print"ok."
  156. 1500 open4,4,7
  157. 1510 print#4,spc(20)chr$(14)na$chr$(15)
  158. 1520 print#4,spc(20)zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$;
  159. 1525 print#4,zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$zm$
  160. 1530 fori=0to18:print#4,spc(20)re$(i):next
  161. 1540 close4
  162. 1550 gosub2520
  163. 1560 goto320
  164. 1570 gosub2500
  165. 1580 lo=1190:be=50640:s=17:z=8:gosub2540
  166. 1590 poke198,0:mp=1
  167. 1600 poke211,7:poke214,6+mp:sys58640:printrn$ud$(mp)rf$:al=mp
  168. 1610 geti$
  169. 1620 ifi$=c4$thenmp=mp+1:goto1670
  170. 1630 ifi$=c2$thenmp=mp-1:goto1670
  171. 1640 ifi$=chr$(13)thenonmpgoto1710,1930,2020,2110
  172. 1650 ifi$="_"thengosub2520:goto320
  173. 1660 goto1610
  174. 1670 ifmp<1thenmp=1
  175. 1680 ifmp>4thenmp=4
  176. 1690 poke211,7:poke214,6+al:sys58640:printud$(al)
  177. 1700 goto1600
  178. 1710 poke211,0:poke214,4:sys58640
  179. 1720 fori=4to23:print"                                        ";:next
  180. 1730 print"                                       ";:poke2023,32
  181. 1740 poke214,4:poke211,0:sys58640
  182. 1750 open15,8,15:open1,8,0,"$"
  183. 1760 input#15,e,e$:ife<>0thenpoke211,0:poke214,5:sys58640:printe$
  184. 1770 ife<>0thenclose1:close15:goto1900
  185. 1780 get#1,i$,i$
  186. 1790 get#1,i$,i$:ifst=64thenclose1:close15:goto1900
  187. 1800 get#1,i$,j$:printasc(i$+chr$(0))+256*asc(j$+chr$(0));
  188. 1810 get#1,i$:printi$;:ifi$<>""then1810
  189. 1820 ifpeek(214)=22then1840
  190. 1830 printrf$;:poke211,0:poke214,peek(214)+1:sys58640:goto1790
  191. 1840 poke211,0:poke214,24:sys58640:printrn$"[212]aste druecken"rf$;
  192. 1850 poke198,0:wait198,1:geti$:poke198,0:ifi$="_"thenclose1:close15:goto1920
  193. 1860 poke214,5:poke211,0:sys58640
  194. 1870 fori=5to23:print"                                        ";:next
  195. 1880 print"                                       ";:poke2023,32
  196. 1890 poke214,5:poke211,0:sys58640:goto1790
  197. 1900 poke211,0:poke214,24:sys58640
  198. 1905 printrn$"[212]aste druecken"rf$;:poke198,0:wait198,1
  199. 1910 poke198,0
  200. 1920 gosub2520:goto320
  201. 1930 lo=1395:be=50780:s=17:z=8:gosub2540
  202. 1940 poke214,12:poke211,12:sys58640:print"[206]ame d. [210]ezepts"
  203. 1950 i$="":ab=0:s=12:z=13:l=15:gosub2590:ifab=1thenab=0:gosub2520:goto320
  204. 1960 open15,8,15,"s:"+i$
  205. 1970 input#15,e,e$
  206. 1980 ife<>0thenpoke211,12:poke214,15:sys58640:printe$
  207. 1990 ife<>0thenpoke198,0:wait198,1:poke198,0
  208. 2000 close15
  209. 2010 gosub2520:goto320
  210. 2020 lo=1395:be=50920:s=17:z=11:gosub2540
  211. 2030 poke214,12:poke211,12:sys58640:print"alter [206]ame"
  212. 2040 i$="":ab=0:s=12:z=13:l=15:gosub2590:ifab=1thenab=0:gosub2520:goto320
  213. 2050 n1$=i$:poke214,15:poke211,12:sys58640:print"neuer [206]ame"
  214. 2060 i$="":ab=0:s=12:z=16:l=15:gosub2590:ifab=1thenab=0:gosub2520:goto320
  215. 2070 n2$=i$
  216. 2080 open15,8,15,"r:"+n2$+"="+n1$
  217. 2090 input#15,e,e$:poke211,12:poke214,18:sys58640:printe$
  218. 2100 close15:poke198,0:wait198,1:poke198,0:gosub2520:goto320
  219. 2110 lo=1395:be=51110:s=17:z=6:gosub2540
  220. 2120 ab=0:i$="":s=20:z=13:l=1:gosub2590:ifab=1thenab=0:gosub2520:goto320
  221. 2130 ifi$="n"thengosub2520:goto320
  222. 2140 ifi$<>"j"then2120
  223. 2150 printcl$c4$c4$c4$"           [195]opyright 1987"
  224. 2160 printc4$c4$"         by  [202]ens [215]ellhausen"
  225. 2170 printc4$"         and [205]artin [210]adetzki"
  226. 2180 sys64738
  227. 2190 iflen(i$)=lthen2210
  228. 2200 fori=1tol-len(i$):i$=i$+" ":next
  229. 2210 l=l-1
  230. 2220 poke211,s:poke214,z:sys58640:printi$
  231. 2230 ifsp<0thenab=4:goto2480
  232. 2240 ifsp>lthenab=5:goto2480
  233. 2250 c=z*40+s+sp+1024:ifpeek(c)<128thenpokec,peek(c)+128
  234. 2260 getg$:ifg$=""then2260
  235. 2270 a=asc(g$):if(a<>95anda>31anda<128)or(a>191anda<234)ora=160ora=255then2390
  236. 2280 ifa=13then2480
  237. 2290 ifa=29thensp=sp+1:pokec,peek(c)-128:goto2230
  238. 2300 ifa=157thensp=sp-1:pokec,peek(c)-128:goto2230
  239. 2310 ifa=19thenab=6:goto2480
  240. 2320 ifa=20then2410
  241. 2330 ifa=17thenab=2:goto2480
  242. 2340 ifa=145thenab=3:goto2480
  243. 2350 ifa=147thenab=7:goto2480
  244. 2360 ifa=148then2460
  245. 2370 ifa=95thenab=1:goto2480
  246. 2380 goto2230
  247. 2390 poke211,s+sp:poke214,z:sys58640
  248. 2400 printg$:i$=left$(i$,sp)+g$+right$(i$,l-sp):sp=sp+1:goto2230
  249. 2410 ifsp>1theni$=left$(i$,sp-1)+right$(i$,l+1-sp)+" "
  250. 2420 ifsp=0then2260
  251. 2430 ifsp=1theni$=right$(i$,l)+" "
  252. 2440 poke211,s:poke214,z:sys58640:printi$:sp=sp-1:goto2230
  253. 2450 i$="":fori=1tol+1:i$=i$+" ":next:goto2220
  254. 2460 i$=left$(left$(i$,sp)+" "+right$(i$,l+1-sp),l+1)
  255. 2470 poke211,s:poke214,z:sys58640:printi$:goto2230
  256. 2480 ifpeek(c)>127thenpokec,peek(c)-128
  257. 2490 return
  258. 2500 poke781,4:poke780,160:poke91,7:poke90,232:poke89,195:poke88,72:sys828
  259. 2510 return
  260. 2520 poke781,192:poke780,0:poke91,195:poke90,72:poke89,7:poke88,232:sys828
  261. 2530 return
  262. 2540 fori=0toz-1
  263. 2550 g=be+i*s:h=int(g/256):poke781,h:poke780,g-256*h
  264. 2560 g=g+s:h=int(g/256):poke91,h:poke90,g-256*h
  265. 2570 g=lo+i*40+s:h=int(g/256):poke89,h:poke88,g-256*h
  266. 2580 sys828:nexti:return
  267. 2590 iflen(i$)=lthen2610
  268. 2600 fori=1tol-len(i$):i$=i$+" ":next
  269. 2610 l=l-1
  270. 2620 poke211,s:poke214,z:sys58640:printi$:sp=0
  271. 2630 ifsp<0thensp=0
  272. 2640 ifsp>lthensp=l
  273. 2650 c=z*40+s+sp+1024:ifpeek(c)<128thenpokec,peek(c)+128
  274. 2660 getg$:ifg$=""then2660
  275. 2670 a=asc(g$):if(a<>95anda>31anda<128)or(a>191anda<234)ora=160ora=255then2770
  276. 2680 ifa=13then2860
  277. 2690 ifa=29thensp=sp+1:pokec,peek(c)-128:goto2630
  278. 2700 ifa=157thensp=sp-1:pokec,peek(c)-128:goto2630
  279. 2710 ifa=19thensp=0:pokec,peek(c)-128:goto2630
  280. 2720 ifa=20then2790
  281. 2730 ifa=147then2830
  282. 2740 ifa=148then2840
  283. 2750 ifa=95thenab=1:return
  284. 2760 goto2630
  285. 2770 poke211,s+sp:poke214,z:sys58640
  286. 2780 printg$:i$=left$(i$,sp)+g$+right$(i$,l-sp):sp=sp+1:goto2630
  287. 2790 ifsp>1theni$=left$(i$,sp-1)+right$(i$,l+1-sp)+" "
  288. 2800 ifsp=0then2660
  289. 2810 ifsp=1theni$=right$(i$,l)+" "
  290. 2820 poke211,s:poke214,z:sys58640:printi$:sp=sp-1:goto2630
  291. 2830 i$="":fori=1tol+1:i$=i$+" ":next:goto2620
  292. 2840 i$=left$(left$(i$,sp)+" "+right$(i$,l+1-sp),l+1)
  293. 2850 poke211,s:poke214,z:sys58640:printi$:goto2630
  294. 2860 fori=l+1to1step-1:ifmid$(i$,i,1)<>" "theni$=left$(i$,i):i=1
  295. 2870 next:pokec,peek(c)-128:return
  296. 60000 rem nachspann ===============
  297. 60010 rem * farbcodes/steuercodes *
  298. 60020 dc$=chr$(008):sl$=chr$(014)
  299. 60030 c4$=chr$(017):rn$=chr$(018)
  300. 60040 he$=chr$(019):c3$=chr$(029)
  301. 60050 bl$=chr$(031):c2$=chr$(145)
  302. 60060 rf$=chr$(146):cl$=chr$(147)
  303. 60070 c1$=chr$(157)
  304. 60080 rem *** zeichensatz/graphik *
  305. 60090 s2$=chr$(160):z0$=chr$(161)
  306. 60100 z1$=chr$(162):zc$=chr$(173)
  307. 60110 zd$=chr$(174):zf$=chr$(176)
  308. 60120 zm$=chr$(183):zn$=chr$(184)
  309. 60130 zv$=chr$(192):yo$=chr$(221)
  310. 60140 return
  311. 60150 rem ende
  312.