home *** CD-ROM | disk | FTP | other *** search
/ Power Pack / Power_Pack_3_1992_Alfons_Mittelmeyer_de.d64 / dubbledate (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  9KB  |  319 lines

  1. 10 rem dubbledate
  2. 20 rem (c) butcher
  3. 25 poke650,128
  4. 30 poke53280,15:poke53281,15:printchr$(147)chr$(14)chr$(8):gosub5300:gosub490
  5. 100 rn$=chr$(018):rf$=chr$(146)
  6. 101 cl$=chr$(147):s1$=chr$(032)
  7. 102 sl$=chr$(014):dc$=chr$(008)
  8. 103 he$=chr$(019):c4$=chr$(017)
  9. 104 d2$=c4$+c4$:d3$=d2$+c4$
  10. 105 d4$=d3$+c4$:d5$=d4$+c4$
  11. 106 a2$=s1$+s1$:a3$=a2$+s1$
  12. 107 a4$=a3$+s1$:a5$=a4$+s1$
  13. 108 c3$=chr$(029):w2$=c3$+c3$
  14. 109 w3$=w2$+c3$:w4$=w3$+c3$
  15. 110 w5$=w4$+c3$:c2$=chr$(145)
  16. 111 c1$=chr$(157):v2$=c1$+c1$
  17. 112 v3$=v2$+c1$:v4$=v3$+c1$
  18. 120 ec$=chr$(009):su$=chr$(142)
  19. 410 goto680
  20. 490 poke646,0
  21. 500 lz$="                                       "
  22. 510 ln$="[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
  23. 520 n=300:dima$(n),sb$(n),z(n):return
  24. 630 poke198,0:wait198,1
  25. 650 rem===================
  26. 660 rem= eingabe/ausgabe =
  27. 670 rem===================
  28. 680 printcl$
  29. 690 gosub2220:gosub1020:gosub1470
  30. 700 geteg$
  31. 710 ifeg$="n"then810
  32. 711 ifeg$="x"then4000
  33. 720 ifeg$="p"then1580
  34. 730 ifeg$="b"then1250
  35. 740 ifeg$="d"then1310
  36. 750 ifeg$="a"then1880
  37. 760 ifeg$="e"thenend
  38. 770 ifeg$="l"then2090
  39. 780 ifeg$="s"then1140
  40. 790 ifeg$="u"then2280
  41. 791 ifeg$="c"thenprintchr$(147):sys828:poke198,0:wait198,1:goto680
  42. 800 goto700
  43. 810 printcl$;:gosub1000
  44. 820 printtab(15)rn$"[206]eueingabe"rf$:gosub1000:gosub1010
  45. 830 printtab(1);:printc4$s1$;:input"[196]ateiname ";cm$
  46. 840 gosub1000:gosub850:goto1050
  47. 850 print:ze=1
  48. 860 printtab(2);:poke631,34:poke198,1:poke19,64
  49. 870 inputa$(ze):poke19,0:printchr$(13);
  50. 880 tl=ze/15:fori=1to40
  51. 890 iftl=ithengosub970
  52. 900 next
  53. 910 ifa$(ze)=chr$(42)thenreturn
  54. 920 ze=ze+1:poke198,0
  55. 930 goto860
  56. 940 rem====================
  57. 950 rem= unterprogramme   =
  58. 960 rem====================
  59. 970 poke211,0:poke214,8:sys58640
  60. 980 fori=0to15:printlz$:next:poke211,0:poke214,8:sys58640:return
  61. 990 printtab(5)c4$rn$str$(a)b$str$(c)str$(d)rf$:return
  62. 1000 printtab(1);:fori=0to35:printchr$(96);:next:printchr$(96):return
  63. 1010 printtab(2)c4$rn$a5$a3$"[197]ingabe beenden mit  *"a5$rf$:return
  64. 1020 printhe$c4$tab(2)rn$a5$a5$a3$"[205][160][197][160][206][160][213] [197]"a5$a5$a3$rf$:gosub1000:return
  65. 1030 fori=1toze:ifze<1then2050:next
  66. 1040 return
  67. 1050 print:printtab(2)c4$rn$s1$"[196]aten speichern     (j/n)"a5$a4$rf$
  68. 1060 printtab(2)c4$"[198]alls noetig, [196]aten-[196]isk einlegen!"
  69. 1070 geteg$
  70. 1080 ifeg$="j"then1140
  71. 1090 ifeg$="n"then680
  72. 1100 goto1070
  73. 1110 rem============================
  74. 1120 rem=  daten speichern         =
  75. 1130 rem============================
  76. 1140 printcl$c4$rn$s1$"[196]aten speichern:"a5$a5$a5$a4$rf$:print
  77. 1150 print"[198]ile-[206]ame: ";cm$
  78. 1160 print:printcm$" wird jetzt abgespeichert.":print"[194]itte warten.":print
  79. 1170 open2,8,2,"@0:"+cm$+",s,w"
  80. 1180 print#2,ze
  81. 1190 fori=1toze:print#2,chr$(34)+a$(i)+chr$(34):next:close2
  82. 1200 gosub1980
  83. 1210 goto1380
  84. 1220 rem============================
  85. 1230 rem=  daten laden             =
  86. 1240 rem============================
  87. 1250 printcl$d2$rn$a2$"[196]aten laden"a5$a5$a5$a5$a5$rf$:print
  88. 1260 input"[196]ateiname: ";cm$
  89. 1270 open2,8,2,"@0:"+cm$+",s,r":printcm$
  90. 1280 input#2,ze
  91. 1290 fori=1toze:input#2,a$(i):next:close2
  92. 1300 gosub1980:goto680
  93. 1310 printcl$w2$rn$s1$"[193]usgabe auf [194]ildschirm"a5$a5$a2$rf$
  94. 1320 print""tab(2)rn$s1$"[197]"s1$rf$"inzel-[211]chritt per [212]astendruck"
  95. 1330 printtab(2)c4$rn$s1$"[199]"s1$rf$"esamte [196]atei anzeigen":gosub1000
  96. 1340 geteg$
  97. 1350 ifeg$="e"then1710
  98. 1360 ifeg$="g"then1780
  99. 1370 goto1340
  100. 1380 printtab(2)c4$rn$s1$"[196] = drucken             [205] = [205]enue "rf$
  101. 1390 geteg$
  102. 1400 ifeg$="d"thengosub1580:goto680
  103. 1410 ifeg$="m"then680
  104. 1420 ifeg$="s"then1140
  105. 1430 goto1390
  106. 1440 rem======================
  107. 1450 rem=  ein/ausgabe-menue =
  108. 1460 rem======================
  109. 1470 printtab(2)rn$s1$"[206]"s1$rf$"eue [196]atei eingeben":print
  110. 1480 printtab(2)rn$s1$"[211]"s1$rf$"peichern einer [196]atei":print
  111. 1490 printtab(2)rn$s1$"[194]"s1$rf$"estehende [196]atei laden":print
  112. 1500 printtab(2)rn$s1$"[193]"s1$rf$"nfuegen an bestehende [196]atei":print
  113. 1510 printtab(2)rn$s1$"[196]"s1$rf$"aten auf [194]ildschirm ":print
  114. 1520 printtab(2)rn$s1$"[208]"s1$rf$"rint ([196]aten auf [196]rucker )":print
  115. 1530 printtab(2)rn$s1$"[204]"s1$rf$"oeschen der [196]aten":print
  116. 1531 printtab(2)rn$s1$"[216]"s1$rf$"[196]aten aendern/editieren":print
  117. 1540 printtab(2)rn$s1$"[213]"s1$rf$"mschalten zur [218]ahlen/[212]extdatei"
  118. 1550 poke211,0:poke214,20:sys58640:gosub1000
  119. 1551 printtab(2)" [195] [146]atalog/[196]irectory   [197] [146]nde"
  120. 1560 return
  121. 1570 rem=======================
  122. 1580 rem= daten ausdrucken    =
  123. 1590 rem=======================
  124. 1600 printcl$c4$rn$s1$"[196]rucker-[210]outine"a5$a5$rf$
  125. 1610 printc4$s1$"[193]enderung der"
  126. 1620 print" [211]ekundaeradresse"
  127. 1630 printtab(19)c2$"7";:printv3$;:inputsa
  128. 1640 printc4$rn$"[215]enn [196]rucker bereit ist, [212]aste druecken "rf$
  129. 1650 poke198,0:wait198,1
  130. 1660 open4,4,sa:cmd4
  131. 1670 print#4,cm$:print#4:fori=1toze:print#4,a$(i):next:print#4:close4:goto680
  132. 1680 rem=======================
  133. 1690 rem= bildschirm-ausgabe  =
  134. 1700 rem=======================
  135. 1710 gosub1030
  136. 1720 printcm$:print:ze=1
  137. 1730 printze;:printtab(5)a$(ze):tl=ze/15:poke198,0:wait198,1
  138. 1740 fori=1to40
  139. 1750 iftl=ithengosub970
  140. 1770 next
  141. 1771 ifa$(ze)=chr$(42)then1380
  142. 1772 ze=ze+1
  143. 1775 goto1730
  144. 1780 gosub1030
  145. 1790 printcm$:print:ze=1
  146. 1791 printze;:printtab(5)a$(ze):tl=ze/15:fori=1to40
  147. 1792 iftl=ithenprintrn$"[212]aste"rf$:poke198,0:wait198,1:gosub970
  148. 1793 next
  149. 1794 ifa$(ze)=chr$(42)then1380
  150. 1795 ze=ze+1
  151. 1796 goto1791
  152. 1840 rem======================
  153. 1850 rem= append (daten an-  =
  154. 1860 rem=         haengen)   =
  155. 1870 rem======================
  156. 1880 printchr$(147):gosub1030:gosub1950:ze=ze-1
  157. 1890 gosub1010:gosub1000:printtab(2)cm$:printc4$tab(2)a$(ze)
  158. 1900 ze=ze+1:printtab(2);:poke198,0:poke631,34:poke198,1:poke19,64
  159. 1910 inputa$(ze):poke19,0:printchr$(13);
  160. 1920 ifa$(ze)=chr$(42)then1940
  161. 1930 goto1900
  162. 1940 print:goto1050
  163. 1950 ifze=300then2050
  164. 1960 printtab(2)rn$s1$"[196]atensaetze bisher:"str$(ze-1)a5$a5$a2$rf$
  165. 1970 printtab(2)" [204]etzter [196]atensatz wird angezeigt":return
  166. 1980 rem=======================
  167. 1990 rem=  disk-fehler        =
  168. 2000 rem=======================
  169. 2010 open1,8,15:input#1,a,b$,c,d
  170. 2020 ifa<>0thengosub990:fori=1to5000:next:close2:close1:cm$="":goto680
  171. 2030 close1
  172. 2040 return
  173. 2050 gosub2220:printhe$c4$c3$rn$s1$"[203]eine [196]aten im [211]peicher ! "rf$:goto630
  174. 2060 rem====================
  175. 2070 rem= daten loeschen   =
  176. 2080 rem====================
  177. 2090 gosub2220:print:printhe$tab(2)c4$rn$" [196]aten loeschen"a5$a5$a5$a5$rf$
  178. 2100 print:printtab(2)"[211]ind [211]ie sicher  (j/n) ?":gosub1000
  179. 2110 getl$
  180. 2120 ifl$="j"then2150
  181. 2130 ifl$="n"then680
  182. 2140 goto2110
  183. 2150 fori=1toze:a$(i)="":next:cm$=""
  184. 2160 print:printtab(2)rn$" [193]rbeitsspeicher ist jetzt leer.": fort=1to2000:next
  185. 2170 goto680
  186. 2180 lz$="                                        ":rem 40 spaces
  187. 2190 poke211,0:poke214,10:sys58640
  188. 2200 fori=1to10:printlz$;:next
  189. 2210 return
  190. 2220 printcl$chr$(176);:fori=0to36:printchr$(96);:next:printchr$(174)
  191. 2230 fori=0to20
  192. 2240 printchr$(125)tab(38)chr$(125)
  193. 2250 next
  194. 2260 printchr$(173);:fori=0to36:printchr$(96);:next:printchr$(189)
  195. 2270 return
  196. 2280 gosub2220:gosub1020:gosub1010
  197. 2290 print:printtab(10)rn$"[212]ext/[218]ahlendatei"rf$:print
  198. 2300 printtab(9)" 1 = [206]eueingabe"
  199. 2310 printtab(9)" 2 = [198]ile laden"
  200. 2320 printtab(9)" 3 = [198]ile speichern"
  201. 2330 printtab(9)" 4 = [198]ile anzeigen"
  202. 2340 printtab(9)" 5 = [198]ile addieren"
  203. 2350 printtab(9)" 6 = [198]ile erweitern"
  204. 2360 printtab(9)" 7 = [196]rucker-[210]ouine"
  205. 2370 printtab(9)" 8 = [197]nde"
  206. 2380 printtab(9)" 9 = [213]mschalten auf "
  207. 2390 printtab(14)"[212]extdatei"
  208. 2391 printtab(9)" [216] = [196]aten aendern"
  209. 2392 print:printtab(9)" [196] = [196]irectory"
  210. 2400 geta$
  211. 2401 ifa$="d"thenprintchr$(147):sys828:poke198,0:wait198,1:goto2280
  212. 2402 ifa$="x"then4110
  213. 2410 onval(a$)goto2430,2530,2590,2640,2720,2850,2950,3050,680
  214. 2420 goto2400
  215. 2430 rem neueingabe
  216. 2440 printcl$tab(2)c4$rn$" [206]eueingabe eines [198]iles "rf$:gosub1000
  217. 2450 gosub1010:gosub1000
  218. 2460 input"[198]ile-[206]ame: ";fl$:ifn=300thenn=0
  219. 2461 print"[194]egriff....................[194]etrag......":println$
  220. 2470 poke19,64:inputsb$(n):poke19,0
  221. 2480 ifsb$(n)=chr$(42)then2280
  222. 2490 printtab(27);:poke19,64:inputz(n):poke19,0:print
  223. 2500 n=n+1
  224. 2510 goto2470
  225. 2520 rem file laden
  226. 2530 printcl$d2$rn$" [198]ile laden "rf$
  227. 2540 printc4$;:input"[198]ile-[206]ame   ";fl$
  228. 2550 open2,8,2,fl$+",s,r"
  229. 2560 input#2,n
  230. 2570 fori=0ton:input#2,sb$(i):input#2,z(i):next:close2
  231. 2580 goto2280
  232. 2590 rem file speichern
  233. 2600 open2,8,2,"@0:"+fl$+",s,w"
  234. 2610 print#2,n
  235. 2620 fori=0ton:print#2,sb$(i):print#2,z(i):next:close2
  236. 2630 goto2280
  237. 2640 rem file anzeigen
  238. 2650 printcl$d2$rn$"  [198]ile anzeigen "rf$
  239. 2660 print"[198]ile-[206]ame  "fl$:println$
  240. 2670 iffl$=""then2940
  241. 2680 fori=0ton-1:q$=str$(z(i)):gosub 3120
  242. 2690 printi;tab(5)sb$(i)tab(39-len(q$))q$:next
  243. 2700 gosub3060
  244. 2710 goto2280
  245. 2720 rem addition
  246. 2730 printcl$d2$rn$"[215]erte addieren"
  247. 2740 print"[198]ile-[206]ame: "fl$:println$
  248. 2750 iffl$=""then2940
  249. 2760 s=0:fori=0ton-1:q$=str$(z(i)):gosub3120
  250. 2770 printi;tab(5)sb$(i)tab(39-len(q$))q$:s=s+z(i):q$=str$(s):next:gosub3120
  251. 2780 printtab(31)"--------":printtab(39-len(q$))q$
  252. 2790 printd3$tab(10)rn$" [193]usdrucken j/n ?[160]"rf$
  253. 2800 geta$:ifa$="n"then2280
  254. 2810 ifa$="j"then2950
  255. 2820 goto2800
  256. 2830 gosub3060
  257. 2840 goto2280
  258. 2850 rem append
  259. 2860 printcl$d2$rn$"[198]ile erweitern/[196]aten anhaengen"
  260. 2870 print"[198]ile-[206]ame  "fl$:println$
  261. 2880 iffl$=""then2940
  262. 2881 print"[194]egriff....................[194]etrag......":println$
  263. 2890 printsb$(n-1)tab(26)z(n-1)
  264. 2900 poke19,64:inputsb$(n):poke19,0
  265. 2901 ifsb$(n)=chr$(42)then2280
  266. 2910 printtab(27);:poke19,64:inputz(n):poke19,0:print
  267. 2920 n=n+1
  268. 2930 goto2900
  269. 2940 printhe$d5$c4$"[203]ein [196]aten im [211]peicher!":fort=1to2000:next:goto2280
  270. 2950 printclc4$rn$" [196]rucker-[210]outine"a5$a5$rf$
  271. 2960 printc4$" [193]enderung der"
  272. 2970 print" [211]ekundaeradresse"
  273. 2980 printtab(19)c2$"7";:printv3$;:inputsa
  274. 2990 printc4$rn$"[215]enn [196]rucker bereit ist, [212]aste druecken "rf$
  275. 3000 poke198,0:wait198,1
  276. 3010 open4,4,sa:cmd4
  277. 3020 print#4,fl$:print#4:fori=0ton-1:q$=str$(z(i)):gosub3120
  278. 3021 printtab(5);:print#4,sb$(i)tab(40-len(sb$(i))-len(q$))q$:next
  279. 3022 q$=str$(s):gosub3120
  280. 3030 print#4,tab(32)"--------":print#4,tab(40-len(q$))q$
  281. 3040 print#4:close4:goto2280
  282. 3050 poke53280,14:poke53281,6:poke646,14:printcl$ec$su$;:end
  283. 3060 printd2$rn$" [212]aste fuer '[205][197][206][213][197]' "rf$
  284. 3070 poke198,0:wait198,1
  285. 3080 return
  286. 3090 rem ========================
  287. 3100 rem = zahlen rechtsbuendig =
  288. 3110 rem ========================
  289. 3120 ez=len(q$)
  290. 3130 lz=len(q$)-3:iflz<1thenlz=1
  291. 3140 forx=eztolzstep-1
  292. 3150 ifmid$(q$,x,1)="."then3180
  293. 3160 next
  294. 3170 dp=dp-ez-1
  295. 3180 ifx>lzthendp=dp-x
  296. 3190 ifx=ez-1thenq$=q$+"0"
  297. 3200 ifx=lz-1thenq$=q$+".00"
  298. 3210 return
  299. 4000 rem ===== text-datei aendern ===
  300. 4010 printchr$(147):printchr$(18)"[212][197][216][212]-[196]aten aendern/editieren."chr$(146)
  301. 4020 print:print"welche [196]atensatz-[206]r. aendern";:inputxe
  302. 4030 print:printtab(3)a$(xe):poke211,0:poke214,5:sys58640
  303. 4040 printtab(2);:poke631,34:poke198,1
  304. 4050 poke19,64:inputa$(xe):poke19,0:printchr$(13);:goto680
  305. 4100 rem ==== text/zahl aendern ======
  306. 4110 printchr$(147):printchr$(18)"[212][197][216][212]/[218][193][200][204]-[196]aten aendern."chr$(146)
  307. 4120 print:print"welche [196]atensatz-[206]r. aendern";:inputxt
  308. 4125 print"[194]egriff"tab(30)"[218]ahl":gosub1000
  309. 4130 printsb$(xt):poke211,0:poke214,6:sys58640
  310. 4135 poke19,64:inputsb$(xt):poke19,0
  311. 4140 printtab(30)z(xt);
  312. 4150 printv4$+v2$;:poke19,64:inputz(xt):poke19,0:print:goto2280
  313. 5300 fori=828to923:readd:pokei,d:next:return
  314. 5310 data 162,155,160,3,169,1,32,189,255,169,3,162,8,160,0,32,186,255,32,192,255
  315. 5320 data 162,3,32,198,255,32,207,255,32,207,255,32,207,255,32,207,255,240,46,32
  316. 5330 data 207,255,168,32,207,255,132,99,133,98,162,144,56,32,73,188,32,221,189
  317. 5340 data 32,135,180,32,33,171,32,207,255,133,2,32,210,255,165,2,208,244,169,13
  318. 5350 data 32,210,255,76,92,3,32,204,255,169,3,32,195,255,96,36
  319.