home *** CD-ROM | disk | FTP | other *** search
/ 64'er 1985 June / 64er_Magazin_85-06_1985_Markt__Technik_de.d64 / prost (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  6KB  |  267 lines

  1. 0 rem **********************************      *                                *
  2. 1 rem *     p r o.s t  6 4  (3)        *      *                                *
  3. 2 rem *         1984  by               *      *       michael anton            *
  4. 3 rem *      herm.essig str 106        *      *      7141 schwieberdingen      *
  5. 4 rem *       (07150)/31576            *      *                                *
  6. 5 rem **********************************
  7. 7 rem "zeile 9 u.10 weglassen, wenn sie das userport-display aus der 64'er"
  8. 8 rem "nicht als maschinenprogramm nachladen koennen"
  9. 9 ifsv=0thensv=1:load"upd.49309",8,1
  10. 10 sys49309
  11. 11 :
  12. 12 poke56,40:clr
  13. 13 :
  14. 14 :
  15. 15 rem *init*
  16. 16 :
  17. 20 an=10240:sv=0:uf=0:bs$(0)="[210]":bs$(1)="[197]":po=56577:poke56579,255:pokepo,0
  18. 30 poke53280,15:poke53281,8:print"[147][159]"
  19. 40 forl=1to8:readhi(l):nextl
  20. 41 data8,7,6,5,4,3,2,1
  21. 50 goto10000
  22. 70 :
  23. 75 :
  24. 80 rem *loesch1*
  25. 81 input"[147]sicher (j/n)";a$:ifa$<>"j"thenreturn
  26. 85 ma=0:sv=0:return
  27. 87 :
  28. 90 rem *loesch2*
  29. 92 forll=an+sstoan+ma+1:pokell,peek(ll+1):nextll:ma=ma-1:return
  30. 93 :
  31. 95 rem *einf*
  32. 97 forll=an+ma+1toan+lxstep-1:pokell+1,peek(ll):nextll:ma=ma+1:return
  33. 98 :
  34. 99 :
  35. 100 rem *eingabe*
  36. 101 :
  37. 102 ifsv=0then105
  38. 103 input"[147]altes programm ueberschreiben (j/n)";a$
  39. 104 ifa$<>"j"thenreturn
  40. 105 uf=0
  41. 110 print"[147]eingabe":print"0[146]  1[146]  del[146]   return[146]   e[146]nde"
  42. 120 gosub6000
  43. 130 :
  44. 160 rem *einsch*
  45. 170 lx=1
  46. 180 print"schritt "lx;tab(15);"87654321":printtab(15);
  47. 190 :
  48. 200 rem *bin-in*
  49. 210 forlb=1to9
  50. 220 gett$:if(t$="0"ort$="1")andlb<9then260
  51. 225 ift$=chr$(13)andlb=9then290
  52. 230 ift$=chr$(20)thenlb=lb-1:print"[157]";:goto220
  53. 240 ift$="e"then340
  54. 250 goto220
  55. 260 bi(lb)=val(t$):printt$;:nextlb
  56. 270 :
  57. 290 rem *bin-dez*
  58. 295 d=0:h=128
  59. 300 forlb=1to8:d=d+bi(lb)*h:h=h/2:nextlb
  60. 305 ifuf=1thenreturn
  61. 310 print"";d:pokean+lx,d
  62. 315 ifuf=2thenreturn
  63. 320 lx=lx+1:iflx+an<40960then180
  64. 330 print"speicherplatz zuende!!"
  65. 340 print:print"eingabeende bei schritt ";lx-1:ma=lx-1:sv=1:gosub6000
  66. 350 return
  67. 400 :
  68. 450 :
  69. 500 rem *editieren*
  70. 502 :
  71. 505 ifsv=0thenprint"[147]speicher leer":goto6000
  72. 510 print"[147]1 _ schritt loeschen":print"2 _ schritt einfuegen"
  73. 520 print"3 _ schritt ersetzen":print"4 _ verlaufsdiagramm":print"5 _ menu"
  74. 530 gett$:ift$=""then530
  75. 535 wa=val(t$):ifwa<1orwa>5then530
  76. 540 onwagoto560,580,587,600,550
  77. 545 goto500
  78. 550 return
  79. 555 :
  80. 560 rem *loeschen*
  81. 565 input"[147]zu loeschender schritt: ";ss:gosub90
  82. 570 print"ok":gosub6000:goto500
  83. 575 :
  84. 580 rem *einfuegen*
  85. 585 input"[147]einfuegen bei schritt: ";lx:gosub95:goto590
  86. 587 input"[147]zu eretzender schritt ";lx
  87. 590 print"neuen schritt eingeben:":uf=2:gosub180
  88. 595 gosub6000:goto500
  89. 597 :
  90. 600 rem *diagramm*
  91. 602 :
  92. 605 ms$="[171][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][179]":ss=1
  93. 610 ko$="   v[146]or    z[146]urueck     a[146]nfang     e[146]nde"
  94. 615 forl=1to8:bz$(l)="":nextl:hz=1
  95. 617 poke211,15:poke214,24:sys58640:print"bitte warten!"
  96. 620 d=peek(an+ss):h=128
  97. 630 forl=1to8:bi=int(d/h)
  98. 650 bz$(hi(l))=bz$(hi(l))+bs$(bi)
  99. 670 d=d-h*bi:h=h/2:nextl
  100. 680 hz=hz+1:ss=ss+1:ifss>mathen700
  101. 690 ifhz<=35then620
  102. 700 print"[147]":forl=1to8:printl;bz$(l):print:nextl:print
  103. 710 printtab(3);"[145]";ms$:print:printtab(2);ss-hz+1:print:printko$
  104. 720 gett$:ift$=""then720
  105. 725 ift$="v"andss<mathen615
  106. 730 zf=0:ift$="z"andss>35thenss=ss-70:zf=1:ifss<1thenss=1
  107. 735 ift$="z"andzf=1then615
  108. 740 ift$="a"thenss=1:goto615
  109. 745 ift$="e"then500
  110. 750 goto720
  111. 1000 :
  112. 1500 :
  113. 2000 rem *start*
  114. 2002 :
  115. 2003 ifsv=0thenprint"[147]speicher leer":goto6000
  116. 2005 print"[147]lauf":print"1 _ freilauf"
  117. 2010 print"2 _ einzelschritt":print"wahl?"
  118. 2015 wait203,63:gett$
  119. 2020 ift$="1"then2040
  120. 2025 ift$="2"then2200
  121. 2030 goto2015
  122. 2040 print"[147]freilauf":print"1 _ dauerlauf"
  123. 2045 print"2 _ x*durchlaufen":print"wahl?"
  124. 2046 wl=0
  125. 2050 wait203,63:gett$
  126. 2055 ift$="1"thenwl=1
  127. 2060 ift$="2"thenwl=2
  128. 2062 ifwl=0then2050
  129. 2064 :
  130. 2065 input "[147]zyklusdauer in sekunden ";zd:zd=zd*55
  131. 2070 ifwl=2theninput"durchlaeufe ";dl
  132. 2075 input"start bei schritt ";ss:ll=0:print"start = < taste >"
  133. 2078 gett$:ift$=""then2078
  134. 2080 l=an+ss
  135. 2090 pokepo,peek(l):ti$="000000"
  136. 2110 ifti<zdthen2110
  137. 2120 ifpeek(653)=1thenk$="break":ll=ll+1:ss=ss+1:goto2160
  138. 2130 ss=ss+1:ifss<=mathen2080
  139. 2135 ll=ll+1:ifll<dlthenss=1:goto2080
  140. 2140 ifwl=1thenss=1:goto2080
  141. 2150 k$="ende"
  142. 2160 print"";k$;" bei durchlauf";ll;" schritt";ss-1:goto6000
  143. 2180 :
  144. 2200 rem *einzel*
  145. 2210 input"[147]durchlaeufe ";dl
  146. 2220 input"start bei ";ss:print"start = < taste >":ll=0
  147. 2230 gett$:ift$=""then2230
  148. 2240 l=an+ss:pokepo,peek(l)
  149. 2250 ifpeek(653)=1thenk$="break":ll=ll+1:goto2160
  150. 2260 ifpeek(653)<>4then2250
  151. 2265 ford=1to50:nextd
  152. 2270 ss=ss+1:ifss<=mathen2240
  153. 2280 ll=ll+1:ifll<dlthenss=1:goto2240
  154. 2290 k$="ende":goto2160
  155. 2400 :
  156. 2500 :
  157. 3000 rem *saven*
  158. 3010 print"[147]absaven"
  159. 3020 input"filename:";na$
  160. 3030 open1,8,2,na$+",s,w":gosub5000
  161. 3035 print"";ds$:ifd1>19then3085
  162. 3040 ll=ma+1:print#1,ll
  163. 3050 forl=1toll:print#1,peek(an+l):nextl
  164. 3085 close1:close15:ifd1>19then3020
  165. 3090 print"file gespeichert":gosub6000
  166. 3100 return
  167. 3200 :
  168. 3300 :
  169. 4000 rem *einlesen*
  170. 4010 print"[147]einlesen"
  171. 4012 ifsv=0then4020
  172. 4014 input"altes programm loeschen??  (j/n)";a$:ifa$<>"j"thenreturn
  173. 4020 input"filename:";na$
  174. 4030 open1,8,2,na$+",s,r":gosub5000
  175. 4035 print"";ds$:ifd1>19then4100
  176. 4040 input#1,ll:ma=ll-1
  177. 4050 forl=1toll:input#1,d:pokean+l,d:nextl
  178. 4100 close1:close15:ifd1>19then4020
  179. 4110 print"file eingelesen":sv=1:gosub6000
  180. 4120 return
  181. 4200 :
  182. 4300 :
  183. 5000 rem *status*
  184. 5010 open15,8,15:input#15,d1,ds$,d2,d3:return
  185. 5050 :
  186. 5100 print"[147]":open1,8,0,"$":a=0
  187. 5110 get#1,x$,x$
  188. 5120 get#1,x$,x$
  189. 5130 get#1,x$,x$
  190. 5140 get#1,x$:ifst<>0then5220
  191. 5150 ifx$<>chr$(34)then5140
  192. 5160 get#1,x$:ifx$<>chr$(34)thenprintx$;:goto5160
  193. 5170 ifa=0thena=1:print:goto5180
  194. 5175 a=0:printtab(20);
  195. 5180 get#1,x$:ifx$=chr$(32)then5180
  196. 5190 get#1,x$:ifx$<>""then5190
  197. 5200 gett$:ift$<>""thengosub5240
  198. 5210 ifst=0then5120
  199. 5220 print
  200. 5230 close1:goto6000
  201. 5240 gett$:ift$=""then5240
  202. 5250 return
  203. 5400 :
  204. 5500 rem *disk*
  205. 5510 print"[147]1 _ saven":print"2 _ einlesen":print"3 _ inhalt"
  206. 5520 gett$:ift$=""then5520
  207. 5525 wa=val(t$):ifwa<1orwa>3then5520
  208. 5530 onwagoto3000,4000,5100
  209. 5600 :
  210. 5700 :
  211. 6000 rem *warten*
  212. 6005 :
  213. 6010 print "<< taste >>"
  214. 6020 gett$:ift$=""then6020
  215. 6030 return
  216. 7000 :
  217. 8000 :
  218. 9000 rem *test*
  219. 9005 :
  220. 9010 print"[147]peripherietest":print"m[146]enu"
  221. 9015 forl=1to8:bi(l)=0:nextl:d=0
  222. 9020 print" 1  2  3  4  5  6  7  8":print
  223. 9025 goto9055
  224. 9030 gett$:ift$=""then9030
  225. 9035 ift$="m"thenreturn
  226. 9040 lb=val(t$):iflb<1orlb>8then9030
  227. 9045 lb=hi(lb)
  228. 9050 ifbi(lb)=1thenbi(lb)=0:goto9054
  229. 9051 ifbi(lb)=0thenbi(lb)=1
  230. 9054 uf=1:gosub290
  231. 9055 print"[145]";:forl=8to1step-1:printbi(l);:nextl:print
  232. 9060 pokepo,d:goto9030
  233. 9100 :
  234. 9200 :
  235. 10000 rem *menu*
  236. 10005 :
  237. 10010 print"[147]p r o.s t  64.1"
  238. 10030 print"1 _ eingabe":print"2 _ editieren"
  239. 10040 print"3 _ diskette":print"4 _ loeschen":print"5 _ starten"
  240. 10050 print"6 _ peripherietest":print"7 _ ende"
  241. 10120 gett$:ift$=""then10120
  242. 10130 wa=val(t$):ifwa<1orwa>7then10120
  243. 10140 onwagosub100,500,5500,80,2000,9000,11000
  244. 10150 goto10000
  245. 10200 :
  246. 10300 :
  247. 11000 rem *ende*
  248. 11005 :
  249. 11010 input"[147]alles gesichert??? (j/n)";a$:ifa$<>"j"thenreturn
  250. 11020 pokepo,0:poke56579,0
  251. 11030 :
  252. 11040 end
  253. 11050 :
  254. 11055 :
  255. 11060 :
  256. 12025 rem directory (5100-5400) frei
  257. 12030 rem nach commodore vic 1541 sdfd
  258. 12035 rem user's manual s.47
  259. 12040 rem userportdisplay von jan
  260. 12045 rem legenhausen, 64'er 8/84
  261. 12050 rem            vielen dank!!!
  262. 12055 :
  263. 12060 rem zeilen 0-5 und 12025 ff.
  264. 12065 rem weglassen!! gilt auch fuer
  265. 12070 :
  266. 12075 rem ^ solche ^
  267.