home *** CD-ROM | disk | FTP | other *** search
/ Input 64 / Input_64_85-01_1985_Verlag_Heinz_Weise_de.d64 / DATEIKASTEN (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  9KB  |  220 lines

  1. 1 poke50257,16:remebergeben v3.0d
  2. 5 poke55,0:poke56,48:poke45,190:poke46,42:clr
  3. 7 printchr$(14)chr$(8):poke650,128
  4. 10 fori=1to40:h$=h$+" ":next
  5. 30 a$="[176]":fori=1to16:a$=a$+"[192]":next:a$=a$+"[174]"
  6. 31 a$=a$+"[157][221]":fori=1to18:a$=a$+"[157]":next
  7. 32 a$=a$+"[221][157]":a$=a$+"[173]":fori=1to16:a$=a$+"[192]":next:a$=a$+"[189]"
  8. 33 ra$=a$
  9. 35 rl$=left$(h$,18)+"[157] ":fori=1to18:rl$=rl$+"[157]":next:rl$=rl$+" [157]"
  10. 36 rl$=rl$+left$(h$,18)
  11. 40 nn=1:gosub7000:poke788,52:gosub150:goto2000
  12. 100 vc=1:hc=35:gosub295:print"s:   [157][157][157]";sn+1
  13. 129 gosub700:sys9888+616
  14. 130 print:return
  15. 150 rem reset speicher
  16. 160 sys2*4096+2*256+11*16+7+616:ns=0:sn=0:dn$="":fori=0to9:a$(i)="":next
  17. 170 return
  18. 200 print"[147]";
  19. 215 print"";:printh$;:vc=1:hc=1:gosub295
  20. 220 printub$:hc=16:gosub295:ifnnthenprintdn$;
  21. 225 print:nn=1
  22. 230 fori=0to9:print" "right$(str$(i),1)" [146] "a$(i):print:next:print""h$
  23. 245 hc=1:vc=23:gosub295:print"";
  24. 250 fori=1tono:print"";:printleft$(w$(i),1);:print"";:printmid$(w$(i),2)" ";:next
  25. 255 vc=25:hc=1:gosub295:printleft$(h$,39);:poke56295,nf:poke2023,160:print"[146]";:return
  26. 295 poke211,hc-1:poke214,vc-1:sys58640:return
  27. 296 poke646,fa:poke53280,rf:poke53281,hf:return
  28. 300 geta$:ifa$=""then300
  29. 320 fori=1tolen(g$):ifa$=mid$(g$,i,1)then350
  30. 325 next
  31. 326 ifa$>="0"anda$<="9"theni=asc(a$)-58:goto350
  32. 330 m$="eingabefehler":gosub400:goto300
  33. 350 si=i+10:m$="":gosub400:return
  34. 400 hc=1:vc=24:gosub295:print"[146]";:printh$;
  35. 420 hc=21-int((len(m$))/2):vc=24:gosub295:printm$;:return
  36. 500 hc=cx:vc=cy:gosub295:print"[146]"ra$:return
  37. 550 hc=cx:vc=cy:gosub295:printrl$:return
  38. 600 gosub295:sys2*4096+256+9*16+14+616
  39. 630 a$="":l=peek(512):ifl=0thenreturn
  40. 640 fori=513to512+l:a$=a$+chr$(peek(i)):next:return
  41. 700 poke160+11,en:hb=int(sn/256):poke177,hb:poke176,sn-256*hb:return
  42. 750 l=len(a$):poke512,l:ifl=0thenreturn
  43. 780 fori=513to512+l:pokei,asc(mid$(a$,i-512,1)):nexti:return
  44. 800 gosub700:sys2*4096+4*256+4*16+10+616:goto630
  45. 850 gosub700:gosub750:sys2*4096+4*256+1*16+9+616:return
  46. 870 sys2*4096+4*256+5*16+14+616:return
  47. 900 lf=0:m$="bitte mit '@' bestaetigen!"
  48. 920 gosub400
  49. 930 geta$:ifa$=""then930
  50. 940 lf=0:ifa$="@"thenlf=1
  51. 945 m$="":goto400
  52. 950 hc=1:vc=25:gosub295
  53. 960 print"anzahl saetze:    [157][157][157][157]"nstab(28)"frei:      [157][157][157][157][157][157]";
  54. 965 fr=peek(247)+peek(248)*256
  55. 970 fr=40960-fr
  56. 975 fr=(fr/26624)*100
  57. 976 printint(fr)"%";:return
  58. 1000 ub$="definition der begriffe":w$(1)="wahltafel":no=1:nn=0:gosub200
  59. 1020 g$="w":gosub300:m$="":gosub400:ifsi=11then2000
  60. 1035 cx=4:cy=2+si*2:gosub500:hc=5:vc=cy+1:gosub600:a$(si)=a$:gosub550:gosub1020
  61. 2000 print"[147]"h$"wahltafel":hc=16:vc=1:gosub295:print"................"
  62. 2015 gosub295:printdn$
  63. 2025 print"definition"
  64. 2030 print"editor"
  65. 2040 print"verarbeitung"
  66. 2045 print"[146]komplett loeschen"
  67. 2050 print""h$
  68. 2055 print"[146]festlegung des dateinamens"
  69. 2060 print"laden einer datei"
  70. 2070 print"sichern einer datei"
  71. 2080 print"";:gosub255
  72. 2090 g$="dvelsfk":gosub300:m$="":lf=0:gosub400:ifsi<11then2000
  73. 2100 onsi-10goto1000,5000,3000,4000,4500,2200,2300
  74. 2200 hc=16:vc=1:gosub600:fori=lto1step-1:ifmid$(a$,i,1)="."ormid$(a$,i,1)=" "thennext
  75. 2220 dn$=left$(a$,i):goto2090
  76. 2300 gosub900:iflf=0then2090
  77. 2305 vc=1:hc=16:gosub295:print"................":gosub150:goto2090
  78. 3000 ub$="editor":w$(1)="wahltafel":w$(2)="vor":w$(3)="rueck":no=5
  79. 3017 w$(4)="loeschen":w$(5)="neuer satz":gosub200:lf=0:sn=0
  80. 3040 ifns=0then3080
  81. 3042 gosub100
  82. 3080 gosub950
  83. 3085 m$="":ifns=0thenm$="keine daten im speicher"
  84. 3090 gosub400
  85. 3100 g$="wvrln":gosub300
  86. 3110 ifsi>10then3200
  87. 3115 ifns=0then3040
  88. 3120 cx=22:cy=2+si*2:gosub500:hc=23:vc=cy+1:gosub600:gosub550
  89. 3140 ifns<=snthengosub870
  90. 3150 b$=a$:en=si:gosub800:iffr<1andlen(b$)>len(a$)then3190
  91. 3160 a$=b$:gosub850:goto3040
  92. 3190 m$="speicher belegt":gosub400:gosub200:goto3040
  93. 3200 onsi-10goto2000,3300,3350,3400,3500
  94. 3300 ifsn>=ns-1thenm$="letzter satz":gosub400:goto3100
  95. 3310 sn=sn+1:goto3040
  96. 3350 ifsn=0thenm$="erster satz":gosub400:goto3100
  97. 3360 sn=sn-1:goto3040
  98. 3400 ifns=0then3080
  99. 3410 sys2*4096+5*256+16+2+616:ns=ns-1:ifsn=nsthensn=sn-1
  100. 3430 goto3040
  101. 3500 iffr<1thenm$="speicher belegt!":gosub400:goto3040
  102. 3501 sn=ns:ns=ns+1:gosub870:goto3040
  103. 4000 gosub900:iflf=0then2090
  104. 4003 ifdk=0then4100
  105. 4005 gosub10000:iffthen2090
  106. 4010 open15,8,15:d$=dn$+",s,r":open1,8,2,d$
  107. 4030 input#15,f,f$:iffthenm$="diskettenfehler: "+f$:lf=0:gosub400:goto4060
  108. 4032 get#1,a$:ifa$<>chr$(1)thenm$="fremddatei!":gosub400:f=1:goto4060
  109. 4035 input#1,ns:fori=0to9:input#1,a$(i):next:sys9420+616
  110. 4060 close1:close15
  111. 4070 iffthen2090
  112. 4080 goto3000
  113. 4100 print"[147]":open1,1,0,dn$:f=0:goto4032
  114. 4500 ifns=0thenm$="nichts im speicher":gosub400:goto2090
  115. 4505 ifdn$=""thenm$="bitte erst dateinamen definieren !":gosub400:goto2090
  116. 4510 ifdk=0then4600
  117. 4513 gosub10000:iffthen2090
  118. 4515 open15,8,15:d$=dn$+",s,w"
  119. 4520 open1,8,2,d$
  120. 4530 input#15,f,f$:iffthen4700
  121. 4535 print#1,chr$(1):print#1,ns:fori=0to9:ifa$(i)=""thena$(i)=" "
  122. 4545 print#1,a$(i):next:sys2*4096+4*256+8*16+4+616
  123. 4560 close1:close15:ifdk=0then2000
  124. 4580 goto2090
  125. 4600 print"[147]":open1,1,1,dn$:goto4535
  126. 4700 iff<>63thenm$="diskettenfehler "+f$:gosub400:goto4560
  127. 4705 m$="wenn file ueberschreiben,dann '@'!":gosub400
  128. 4710 geta$:ifa$=""then4710
  129. 4713 m$="":gosub400
  130. 4715 ifa$<>"@"then4560
  131. 4720 d$="@:"+d$:close1:goto4520
  132. 5000 ifns=0thenm$="keine daten im speicher":gosub400:lf=1:goto2090
  133. 5005 fori=0to9:f$(i)="":next
  134. 5010 ub$="verarbeitung"
  135. 5015 w$(1)="wahltafel":w$(2)="suchen":w$(3)="ordnen":no=3:nn=0:gosub200:gosub950
  136. 5030 g$="wso":gosub300:m$="":gosub400
  137. 5040 ifsi>10thenonsi-10goto2000,5200,5100
  138. 5060 cx=22:cy=2+si*2:gosub500:hc=23:vc=cy+1:gosub600:f$(si)=a$:gosub550:goto5030
  139. 5100 fori=0to9:iff$(i)<>"*"thennext:m$="bitte mit '*' waehlen!":gosub400:goto5030
  140. 5105 ek=i
  141. 5110 pf=0:m$="ich ordne...":goto5500
  142. 5200 pf=1:m$="ich suche...":goto5500
  143. 5500 lf=0:gosub400:ba=3*4096:l=0:fori=0to9
  144. 5520 f$=f$(i):l=len(f$):pokeba,l:ifl=0then5550
  145. 5540 forj=1tol:pokeba+j,asc(mid$(f$,j,1)):next
  146. 5550 ba=ba+l+1:nexti
  147. 5600 ifpfthensys2*4096+5*256+8*16+15+616
  148. 5601 ifpf=0thenen=ek:gosub700:sys2*4096+7*256+4*16+8+616
  149. 5602 ba=3*4096+256
  150. 5610 an=peek(ba)+peek(ba+1)*256
  151. 5620 ifan=0thenm$="keine daten gefunden":gosub400:goto5030
  152. 5700 ub$="datenausgabe"
  153. 5710 w$(1)="wahltafel":w$(2)="vor":w$(3)="rueck":w$(4)="drucken"
  154. 5720 w$(5)="neue datei":no=4+pf:gosub200
  155. 5730 m$="ordnet":ifpfthenm$="funden"
  156. 5731 m$=str$(an)+" saetze ge"+m$:gosub400
  157. 5740 po=ba+2:pn=1
  158. 5750 sn=peek(po)+peek(po+1)*256:gosub100:gosub6200
  159. 5800 g$="wvrd":ifpftheng$=g$+"n"
  160. 5801 gosub300:m$="":gosub400
  161. 5805 ifsi<11then5800
  162. 5810 onsi-10goto2000,5820,5850,5900,6000
  163. 5820 ifpn=anthenm$="letzter satz":gosub400:goto5800
  164. 5825 pn=pn+1:po=po+2:goto5750
  165. 5850 ifpn=1thenm$="erster satz":gosub400:goto5800
  166. 5860 pn=pn-1:po=po-2:goto5750
  167. 5900 open1,4,1:sys2*4096+7*256+2*16+14+616
  168. 5901 ifpeek(832)thenm$="kein drucker angeschlossen !":lf=0:gosub400:close1:goto5800
  169. 5902 close1:goto6100
  170. 5910 open4,4,(peek(53272)and2)*3.5:ifefthen5930
  171. 5920 print#4,"dateiname    : ";dn$
  172. 5925 print#4,"datensaetze  :";ns
  173. 5927 print#4,"ausgesucht   :";an
  174. 5929 print#4,"----------------------------------------":print#4
  175. 5930 po=ba+2:forpi=0toan-1
  176. 5940 sn=peek(po)+peek(po+1)*256
  177. 5943 ifef=0thenprint#4,"datensatz nr.:"sn
  178. 5944 print#4:foren=0toed:ifa$(en)=""then5950
  179. 5945 ifef=0thenprint#4,"  "a$(en)":"left$(h$,20-len(a$(en)));
  180. 5948 gosub800:print#4,a$
  181. 5950 next:po=po+2:print#4:next:close4
  182. 5990 goto5010
  183. 6000 gosub900:iflf=0then5800
  184. 6010 lf=0:m$="ich ordne...":gosub400
  185. 6020 ns=an:sys2*4096+5*256+13*16+7+616
  186. 6030 goto2000
  187. 6100 vc=23:hc=1:gosub295
  188. 6105 print"wahltafel drucken: alles nur daten 0-9"
  189. 6110 g$="wa":gosub300
  190. 6120 ifsi<10thened=si:ef=1:goto5910
  191. 6130 ifsi=11then2000
  192. 6135 ed=9:ef=0:goto5910
  193. 6200 print"anzahl saetze:    [157][157][157][157]"nstab(22)"laufende nr.:    [157][157][157][157]";pn;:return
  194. 7000 print"[147]";
  195. 7010 rf=0:hf=0:nf=5:sf=1:fa=nf:gosub296
  196. 7020 print"    dddd    a   ttttt eeeee  iii
  197. 7030 [153]"    d   d  a a    t   e       i
  198. 7035 print"    d   d a   a   t   e       i
  199. 7040 [153]"    d   d a   a   t   eeee    i   ---
  200. 7045 print"    d   d aaaaa   t   e       i
  201. 7050 [153]"    d   d a   a   t   e       i
  202. 7055 print"    dddd  a   a   t   eeeee  iii
  203. 7056 [153]:[153]
  204. 7060 [153]"  k   k   a    ssss ttttt eeeee n   n
  205. 7065 print"  k  k   a a  s       t   e     n   n
  206. 7070 [153]"  k k   a   a s       t   e     nn  n
  207. 7074 print"  kk    a   a  sss    t   eeee  n n n
  208. 7080 [153]"  k k   aaaaa     s   t   e     n  nn
  209. 7085 print"  k  k  a   a     s   t   e     n   n
  210. 7090 [153]"  k   k a   a ssss    t   eeeee n   n
  211. 7095 print:print:print"             von peter sager"
  212. 7100 print:print:print"arbeiten sie mit kassette oder diskette?";
  213. 7110 g$="kd":gosub300
  214. 7120 ifsi<11then7110
  215. 7130 dk=0:ifsi=12thendk=1
  216. 7999 return
  217. 10000 open1,8,1:sys2*4096+7*256+2*16+14+616
  218. 10001 f=0:ifpeek(832)thenf=1:m$="diskettenlaufwerk fehlt !":gosub400
  219. 10002 close1:return
  220.