home *** CD-ROM | disk | FTP | other *** search
/ 64'er 1985 December / 64er_Magazin_85-12_1985_Markt__Technik_de.d64 / lit.verw. (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  8KB  |  288 lines

  1. 10 rem *******************************
  2. 15 rem *                             *
  3. 20 rem *    literatur verwaltung     *
  4. 25 rem *                             *
  5. 30 rem *        demoprogramm         *
  6. 35 rem *          zu  smu            *
  7. 40 rem *                             *
  8. 45 rem * autor: georg krcal          *
  9. 50 rem *                             *
  10. 60 rem * ziegelhofstrasse 36/11/9    *
  11. 65 rem * a-1220 wien                 *
  12. 70 rem * telefon: 22-17-724          *
  13. 75 rem *                             *
  14. 80 rem *******************************
  15. 100 ifa=0thenpoke56,144:clr:a=1:load"smubu",8,1
  16. 110 clr:sys9*4096
  17. 120 printchr$(147)chr$(8)chr$(14)chr$(30);
  18. 130 poke53280,0:poke53281,0
  19. 140 dim m$(14),h$(20)
  20. 150 rem
  21. 160 !mask "zeitschrift",8,m$(0)
  22. 170 fori=1to40:cd$=cd$+chr$(17)
  23. 180 cr$=cr$+chr$(29):bl$=bl$+" ":next
  24. 190 cd$=chr$(19)+cd$:x=fre(0)
  25. 200 ri$=chr$(18):ro$=chr$(146)
  26. 210 b1$=ri$+"1"+ro$+" eingeben "+ri$+"3"+ro$+" suchen   "+ri$+"5"+ro$
  27. 220 b1$=b1$+" weiter  "
  28. 230 b2$=ri$+"2"+ro$+" drucken  "
  29. 240 b2$=b2$+ri$+"4"+ro$+" index    "+ri$+"6"+ro$+" prg-ende"
  30. 300 print"[196]iskette formatieren [j/n]";:wait 203,63
  31. 310 getg$:ifg$<>"j"then380
  32. 320 printg$"a":print"[196]iskettenname:"
  33. 330 print"[196]isketten - [201][196]":!inline 1,15,16,dn$
  34. 340 !inline2,16,2,di$:ifdi$="  "then340
  35. 350 h$="n:"+dn$+","+di$:print:print"  [196]iskette einlegen - [212]aste druecken"
  36. 360 getg$:ifg$=""then360
  37. 370 rem "open 1,8,15,h$:close1"
  38. 380 printchr$(147)"[194]estehende [196]atei [j/n] ?"
  39. 390 wait203,63:getg$:ifg$="j"then500
  40. 400 ifg$<>"n"then390
  41. 410 open1,8,2,"literatur,l,"+chr$(202)
  42. 420 gosub10000
  43. 440 open2,8,15
  44. 450 print#2,"p"+chr$(2)+chr$(44)+chr$(1)+chr$(1)
  45. 460 print#1,chr$(255)
  46. 470 print#2,"p"+chr$(2)+chr$(1)+chr$(1)+chr$(1)
  47. 480 print#1,1,chr$(13);1;chr$(13);1
  48. 490 close2:close1
  49. 500 gosub10000:open1,8,2,"literatur,l,"+chr$(202)
  50. 510 open2,8,15
  51. 520 print#2,"p"+chr$(2)+chr$(1)+chr$(1)+chr$(1)
  52. 530 input#2,en,en$,t,s:ifenthenclose1:close2:gosub10070:goto500
  53. 540 input#1,lr,se,ae:close2:close1
  54. 550 ts=se+100:ta=ae+100
  55. 580 dims$(se+100),au$(ae+100),sl$(se+100),sh$(se+100),al$(ae+100),ah$(ae+100)
  56. 590 ifse=1then680
  57. 600 open1,8,2,"stichwort,s,r":open2,8,15:input#2,en,en$,t,s
  58. 610 ifenthenclose1:gosub10070:goto600
  59. 620 fori=1tose-1:input#1,s$(i)
  60. 625 gosub7300:sl$(i)=h$:sh$(i)=h1$
  61. 630 nexti:close2:close1
  62. 640 open1,8,2,"autor,s,r"
  63. 650 rem  ifenthenclose1:gosub10070:goto640
  64. 660 fori=1toae-1:input#1,au$(i)
  65. 665 gosub7300:al$(i)=h$:ah$(i)=h1$
  66. 670 nexti:close1
  67. 680 print"[147]":gosub10030
  68. 700 !screen m$(0)
  69. 710 gosub10040
  70. 720 !imask "[133][134][135][137][138][139]",s$,t1$,t2$,t3$,t4$,au$,v1$,v2$,o$,ja,se$,b$,an,z1$,z2$
  71. 725 gosub10000
  72. 730 onpeek(2)goto740,1100,1000,1200,720,2000,720
  73. 740 ifse+1>tsthenprint"stichwortdatei zu gross":stop
  74. 750 gosub7000:iflen(sl$(ei+1))>255thenprint"stichworttabelle zu gross":stop
  75. 760 ifge=1thenh1=i:goto780
  76. 770 h1=ei+1:se=se+1:h3$="":h4$=""
  77. 772 fori=ei+1tose:h$=s$(i):s$(i)=s$:s$=h$
  78. 773 h1$=sl$(i):sl$(i)=h3$:h3$=h1$:h2$=sh$(i):sh$(i)=h4$:h4$=h2$
  79. 775 nexti
  80. 780 ifae+1>tathenprint"autorendatei zu gross":stop
  81. 790 gosub7100:iflen(al$(ei+1))>255thenprint"autorentabellenueberlauf":stop
  82. 800 ifge=1thenei=i-1:goto820
  83. 810 ae=ae+1:h3$="":h4$=""
  84. 812 fori=ei+1toae:h$=au$(i):au$(i)=au$:au$=h$
  85. 813 h1$=al$(i):al$(i)=h3$:h3$=h1$:h2$=ah$(i):ah$(i)=h4$:h4$=h2$:next
  86. 820 lr=lr+1:h=lr:gosub7200
  87. 830 sh$(h1)=sh$(h1)+chr$(hb):sl$(h1)=sl$(h1)+chr$(lb)
  88. 840 ah$(ei+1)=ah$(ei+1)+chr$(hb):al$(ei+1)=al$(ei+1)+chr$(lb)
  89. 845 rem   gosub 11000:lr=lr+1:goto700
  90. 850 open1,8,2,"literatur,l,"+chr$(202)
  91. 860 open2,8,15
  92. 870 print#2,"p"+chr$(2)+chr$(lb)+chr$(hb)+chr$(1)
  93. 880 h$=t1$+t2$+t3$+t4$+v1$+left$(v2$,10):print#1,h$
  94. 890 lr=lr+1:lb=lb+1:iflb=256thenlb=0:hb=hb+1
  95. 900 print#2,"p"+chr$(2)+chr$(lb)+chr$(hb)+chr$(1)
  96. 910 h3$=right$(v2$,28)+o$
  97. 920 h$=str$(ja):gosub7210:h1$=h$+left$(bl$,(4-len(h$)))
  98. 930 h$=str$(an):gosub7210:h2$=h$+left$(bl$,(2-len(h$)))
  99. 940 h$=h3$+h1$+se$+b$+h2$+z1$+z2$+au$(ei+1)+s$(h1):print#1,h$
  100. 999 close2:close1:goto700
  101. 1000 we=1:gosub8000:ifwe=0then730
  102. 1010 goto710
  103. 1100 open4,4,7:gosub10000:gosub7900:close4:goto710
  104. 1200 s1=1:open4,4,7:print#4,chr$(13)chr$(13)chr$(13)
  105. 1220 print#4,chr$(14);"[211][212][201][195][200][215][207][197][210][212][197][210]";chr$(15);chr$(13);chr$(13)chr$(13)
  106. 1230 fori=1tose-1:forj=1to20:h$(j)=" ":next
  107. 1240 h$=s$(i):gosub7210:h$(1)=h$+": "
  108. 1250 z=1:forj=1tolen(sl$(i))
  109. 1260 h=asc(mid$(sl$(i),j,1)):h1=asc(mid$(sh$(i),j,1))
  110. 1270 h$=str$((h+h1*256)/2):gosub7210:h$=h$+","
  111. 1280 iflen(h$(z))+len(h$)>79thenz=z+1
  112. 1290 h$(z)=h$(z)+h$:next
  113. 1300 h$(z)=left$(h$(z),(len(h$(z))-1))
  114. 1310 forj=1toz:print#4,h$(j)
  115. 1315 nextj
  116. 1320 nexti
  117. 1330 print#4,chr$(13)chr$(13)chr$(13)
  118. 1340 print#4,chr$(14)"[193][213][212][207][210][197][206]"chr$(15)chr$(13)chr$(13)chr$(13)
  119. 1350 fori=1toae-1:forj=1to20:h$(j)=" ":next
  120. 1360 h$=au$(i):gosub7210:h$(1)=h$+": "
  121. 1370 z=1:forj=1tolen(al$(i))
  122. 1380 h=asc(mid$(al$(i),j,1)):h1=asc(mid$(ah$(i),j,1))
  123. 1390 h$=str$((h+h1*256)/2):gosub7210:h$=h$+","
  124. 1400 iflen(h$(z))+len(h$)>79thenz=z+1
  125. 1410 h$(z)=h$(z)+h$:next
  126. 1420 h$(z)=left$(h$(z),(len(h$(z))-1))
  127. 1430 forj=1toz:print#4,h$(j)
  128. 1440 nextj
  129. 1450 nexti
  130. 1460 print#4,chr$(13)chr$(13)chr$(13)
  131. 1470 print#4,chr$(14)"[204][201][212][197][210][193][212][213][210][211][212][197][204][204][197][206]"chr$(15)chr$(13)chr$(13)chr$(13)
  132. 1480 fori=2tolr-1step2
  133. 1490 h=i:gosub7200:gosub9000:gosub7400
  134. 1510 h$=str$(i/2):gosub7210:h$="("+h$+")"
  135. 1520 h$=h$+left$(bl$,(9-len(h$)))+h$(1):print#4,h$
  136. 1530 forj=2toz:print#4,spc(9);h$(j):next
  137. 1550 nexti
  138. 1560 close4:goto710
  139. 2000 open1,8,15,"s:stichwort":close1
  140. 2010 open1,8,2,"stichwort,s,w"
  141. 2020 fori=1tose-1:h$=chr$(34)+s$(i)+chr$(34):print#1,h$
  142. 2030 forj=1tolen(sl$(i)):g=asc(mid$(sl$(i),j,1))
  143. 2040 print#1,g
  144. 2052 g=asc(mid$(sh$(i),j,1)):print#1,g:next
  145. 2054 print#1,"++":nexti
  146. 2060 close1
  147. 2070 open1,8,15,"s:autor":close1
  148. 2080 open1,8,2,"autor,s,w"
  149. 2090 fori=1toae-1:h$=chr$(34)+au$(i)+chr$(34):print#1,h$
  150. 2100 forj=1tolen(al$(i)):g=asc(mid$(al$(i),j,1))
  151. 2110 print#1,g
  152. 2122 g=asc(mid$(ah$(i),j,1)):print#1,g:next
  153. 2130 print#1,"++":nexti:close1
  154. 2140 open1,8,2,"literatur,l,"+chr$(202)
  155. 2150 open2,8,15
  156. 2160 print#2,"p"+chr$(2)+chr$(1)+chr$(1)+chr$(1)
  157. 2170 h$=str$(lr)+chr$(13)+str$(se)+chr$(13)+str$(ae)
  158. 2180 print#1,h$
  159. 2200 close2:close1
  160. 2210 print"[147]";:end
  161. 7000 li=se:ei=0:i=0:ge=0
  162. 7010 if((li-ei)/2)<1thenreturn:rem stichwort nicht vorhanden
  163. 7020 i=int((li-ei)/2)+ei
  164. 7030 ifs$(i)=s$thenge=1:return
  165. 7040 ifs$<s$(i)thenli=i:goto7010
  166. 7050 ei=i:goto7010
  167. 7100 li=ae:ei=0:i=0:ge=0
  168. 7110 if((li-ei)/2)<1thenreturn:rem autor nicht vorhanden
  169. 7120 i=int((li-ei)/2)+ei
  170. 7130 ifau$(i)=au$thenge=1:return
  171. 7140 ifau$<au$(i)thenli=i:goto7110
  172. 7150 ei=i:goto7110
  173. 7200 hb=int(h/256):lb=h-hb*256:return
  174. 7210 forii=len(h$)to1step-1:ifmid$(h$,ii,1)=" "thennext
  175. 7220 h$=left$(h$,ii):forii=1tolen(h$):ifmid$(h$,ii,1)=" "thennext
  176. 7230 h$=right$(h$,(len(h$)-ii+1)):return
  177. 7300 h1$="":h$="":forj=1to256:input#1,g$:ifg$="++"thenj=256:return
  178. 7305 ifg$="0 "thenh$=h$+chr$(0):goto7315
  179. 7310 h$=h$+chr$(val(g$))
  180. 7315 input#1,g$
  181. 7320 ifg$="0 "thenh1$=h1$+chr$(0):goto7340
  182. 7330 h1$=h1$+chr$(val(g$))
  183. 7340 nextj:return
  184. 7400 forl=1to10:h$(l)="":next
  185. 7405 ifau$=left$(bl$,25)thenau$="?"
  186. 7410 h$=au$:gosub7210:h$(1)=h$+":"
  187. 7420 ift1$=left$(bl$,38)thent1$="?"
  188. 7430 h$=t1$:gosub7210:h$(2)=h$+" ":z=1
  189. 7440 ift2$=left$(bl$,38)then7500
  190. 7450 h$=t2$:gosub7210:h$(2)=h$(2)+h$+" "
  191. 7460 ift3$=left$(bl$,38)then7500
  192. 7470 z=2:h$=t3$:gosub7210:h$(3)=h$+" "
  193. 7480 ift4$=left$(bl$,38)then7500
  194. 7490 h$=t4$:gosub7210:h$(3)=h$(3)+h$
  195. 7500 z=z+1:h$(z)=h$(z)+"."
  196. 7510 ifb$="n"orb$="[206]"then7660
  197. 7520 z=z+1:ifo$=left$(bl$,34)theno$="?"
  198. 7530 h$=o$:gosub7210:h$(z)=h$(z)+h$
  199. 7540 ifv2$=left$(bl$,38)thenh$="":goto7560
  200. 7550 h$=v2$:gosub7210
  201. 7560 iflen(h$(z))+len(h$)+2>70thenz=z+1
  202. 7570 h$(z)=h$(z)+h$+", "
  203. 7580 ifja=0thenh$="?":goto7600
  204. 7590 h$=str$(ja):gosub7210
  205. 7600 iflen(h$(z))+len(h$)+2>70thenz=z+1
  206. 7610 h$(z)=h$(z)+h$+", "
  207. 7620 ifse$=left$(bl$,10)thenh$="":goto7650
  208. 7630 h$=se$:gosub7210
  209. 7640 iflen(h$(z))+len(h$)+1>70thenz=z+1
  210. 7650 h$(z)=h$(z)+h$+".":return
  211. 7660 z=z+1:ifz1$=left$(bl$,38)thenh$="?"
  212. 7670 h$=z1$:gosub7210:h$(z)=h$(z)+h$+" "
  213. 7680 ifz2$=left$(bl$,38)orh$="?"thenh$="":goto7700
  214. 7690 h$=z2$:gosub7210
  215. 7700 iflen(h$(z))+len(h$)+1>70thenz=z+1
  216. 7710 h$(z)=h$(z)+h$+" "
  217. 7720 ifan=0thenh$="?":goto7740
  218. 7730 h$=str$(an):gosub7210
  219. 7740 iflen(h$(z))+len(h$)+1>70thenz=z+1
  220. 7750 h$(z)=h$(z)+h$+" "
  221. 7760 ifja=0thenh$="(?)":goto7780
  222. 7770 h$=str$(ja):gosub7210:h$="("+h$+")"
  223. 7780 iflen(h$(z))+len(h$)+1>70thenz=z+1
  224. 7790 h$(z)=h$(z)+h$+" "
  225. 7800 ifse$=left$(bl$,10)thenh$="":goto7830
  226. 7810 h$=se$:gosub7210
  227. 7820 iflen(h$(z))+len(h$)+1>70thenz=z+1
  228. 7830 h$(z)=h$(z)+h$+".":return
  229. 7900 gosub7400:form=1toz:print#4,h$(m):next:return
  230. 8000 h=0:h2=0
  231. 8005 ifs$<>left$(bl$,21)thengosub7000:ifge=1then h=1:h1=i
  232. 8010 ifau$<>left$(bl$,25)thengosub7100:ifge=1thenh2=1:h3=i
  233. 8015 ifh=0andh2=0thenreturn
  234. 8020 ifh2=1or(h2=1andh=1)then8080
  235. 8030 fori=1tolen(sl$(h1)):lb=asc(mid$(sl$(h1),i,1))
  236. 8050 hb=asc(mid$(sh$(h1),i,1)):gosub9000
  237. 8060 gosub9300:ifwe=0thenreturn
  238. 8070 nexti:return
  239. 8080 ifh2=1andh=1then8140
  240. 8090 fori=1tolen(al$(h3)):lb=asc(mid$(al$(h3),i,1))
  241. 8100 hb=asc(mid$(ah$(h3),i,1)):gosub9000
  242. 8110 gosub9300:ifwe=0thenreturn
  243. 8120 nexti:return
  244. 8140 h1$=sh$(h1):h2$=ah$(h3):h4$=sl$(h1):h5$=al$(h3)
  245. 8150 ifh1$>h2$thenh3$=h2$:h2$=h1$:h1$=h3$:h3$=h5$:h5$=h4$:h4$=h3$
  246. 8160 fori=1tolen(h1$):forl=1tolen(h2$)
  247. 8170 ifmid$(h1$,i,1)<>mid$(h2$,l,1)thennextl,i:return
  248. 8175 ifmid$(h4$,i,1)<>mid$(h5$,l,1)thennextl,i:return
  249. 8180 lb=asc(mid$(h4$,i,1)):hb=asc(mid$(h1$,i,1))
  250. 8190 gosub9000:gosub9300
  251. 8200 ifwe=0thenreturn
  252. 8210 nextl,i:return
  253. 9000 open1,8,2,"literatur,l,"+chr$(202)
  254. 9010 open2,8,15
  255. 9020 print#2,"p"+chr$(2)+chr$(lb)+chr$(hb)+chr$(1)
  256. 9030 forj=0to3:h$(j)=""
  257. 9040 fork=1to38:get#1,g$:h$(j)=h$(j)+g$:next:next
  258. 9050 t1$=h$(0):t2$=h$(1):t3$=h$(2):t4$=h$(3)
  259. 9060 v1$="":forj=0to37:get#1,g$:v1$=v1$+g$:next
  260. 9061 v2$="":forj=0to9:get#1,g$:v2$=v2$+g$:next
  261. 9062 lb=lb+1:iflb>255thenlb=0:hb=hb+1
  262. 9063 print#2,"p"+chr$(2)+chr$(lb)+chr$(hb)+chr$(1)
  263. 9070 forj=1to28:get#1,g$:v2$=v2$+g$:next
  264. 9080 o$="":forj=1to34:get#1,g$:o$=o$+g$:next
  265. 9090 h$="":forj=1to4:get#1,g$:h$=h$+g$:next:ja=val(h$)
  266. 9095 se$="":forj=1to10:get#1,g$:se$=se$+g$:next
  267. 9100 get#1,b$
  268. 9110 h$="":forj=1to2:get#1,g$:h$=h$+g$:next:an=val(h$)
  269. 9130 z1$="":forj=1to38:get#1,g$:z1$=z1$+g$:next
  270. 9140 z2$="":forj=1to38:get#1,g$:z2$=z2$+g$:next
  271. 9150 au$="":forj=1to25:get#1,g$:au$=au$+g$:next
  272. 9160 s$="":forj=1to21:get#1,g$:s$=s$+g$:next
  273. 9290 close2:close1:return
  274. 9300 gosub 10040
  275. 9305 !iomask "[133][134][135][137][138][139]",s$,t1$,t2$,t3$,t4$,au$,v1$,v2$,o$,ja,se$,b$,an,z1$,z2$
  276. 9310 ifpeek(2)=2thenopen4,4,7:gosub7900:close4:goto9330
  277. 9320 ifpeek(2)<>5thenwe=0
  278. 9330 gosub10000:return
  279. 9999 stop
  280. 10000 printleft$(cd$,24)bl$left$(bl$,38)chr$(145)chr$(145);
  281. 10010 printleft$(cd$,24)spc(12)"[211][217][211][212][197][205][160][193][210][194][197][201][212][197][212]";
  282. 10020 return
  283. 10030 printleft$(cd$,24)bl$chr$(20)right$(bl$,39)chr$(145)chr$(145);:return
  284. 10040 gosub 10030:printleft$(cd$,24)b1$;:printleft$(cd$,25)b2$chr$(145)chr$(145);
  285. 10050 return
  286. 10060 !dier en,en$,t,s
  287. 10070 printen;en$;t;s:stop
  288.