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

  1. 10 rem*********************************
  2. 20 rem* programmname : xref           *
  3. 30 rem*     c-64                      *
  4. 40 rem*     floppy 1541 o. aehnliche  *
  5. 50 rem*     drucker (z.b. mps 801)    *
  6. 60 rem* von stefan becker             *
  7. 70 rem*********************************
  8. 80 clr:goto150
  9. 90 get#1,a$:x=asc(a$+n$):if(64andst)=0thenreturn
  10. 100 close1:ifpathenpa=0:goto520
  11. 110 goto960
  12. 120 gosub90:x1=x:gosub90:x=x1+256*x:return
  13. 130 ifsp<obandva<obandps<obthenreturn:rem*** grenzen erreicht ? ***
  14. 140 print:print"[194]itte die [214]ariable ob in [218]eile 150 vergroessern.":goto1310
  15. 150 ob=500:dimsp$(ob),ps$(ob),va$(ob)
  16. 160 rem*** ob ist obergrenze der anzahl der spruenge und variablen ***
  17. 170 poke53280,6:poke53281,6
  18. 180 n$=chr$(0)
  19. 190 le$="                                                  "
  20. 200 printchr$(147)chr$(9)chr$(14)chr$(8)chr$(144);
  21. 210 print"          [195]ross-[210]eferenz-[204]ister         "
  22. 220 print"[193]usgabe auf ":print"[194][146]ildschirm oder [196][146]rucker[145][145][145]"
  23. 230 printspc(12);:poke204,0
  24. 240 geta$:ifa$<>"b"anda$<>"d"goto240
  25. 250 ifa$="b"thenprint"[194]ildschirm.":dv=3:goto270
  26. 260 print"[196]rucker.":dv=4
  27. 270 print"                       [145]"
  28. 280 open1,0:print"[208]rogrammname: ";:input#1,na$:close1:print
  29. 290 open2,8,15:open1,8,2,na$+",p,r":gosub1290:gosub120:ifx=2049then310
  30. 300 print:print"[196]as [208]rogramm muss ab 2049 liegen.":goto1310
  31. 302 :
  32. 304 :
  33. 305 rem********************************
  34. 306 rem     pass 1 sprungtabelle
  35. 308 rem********************************
  36. 309 :
  37. 310 print"[147][208]ass 1 ([211]uchen der [211]pruenge)":pa=1
  38. 320 gosub120:gosub120:ze$=right$("     "+str$(x),5):print""ze$
  39. 330 gosub90:ifx=137orx=138orx=141orx=167thens1$="":goto360
  40. 340 ifx=0goto320
  41. 350 goto330
  42. 360 gosub90:ifx=32goto360
  43. 370 ifx>=48andx<=57thens1$=s1$+a$:goto360
  44. 380 ifs1$=""goto470
  45. 390 s1$=right$("      "+s1$,6)
  46. 400 ifleft$(sp$(sp),5)<>ze$thensp=sp+1:gosub130:sp$(sp)=ze$+":"
  47. 410 iflen(sp$(sp))>70thensp=sp+1:gosub130:sp$(sp)=ze$+":"
  48. 420 ifright$(sp$(sp),6)<>s1$thensp$(sp)=sp$(sp)+s1$
  49. 430 fori=1tops
  50. 440 ifleft$(ps$(i),6)<>s1$thennext:ps=i:gosub130:ps$(i)=s1$+":"
  51. 450 iflen(ps$(i))>70thennext:ps=ps+1:i=ps:gosub130:ps$(i)=s1$+":"
  52. 460 ifright$(ps$(i),5)<>ze$thenps$(i)=ps$(i)+" "+ze$
  53. 470 ifx=0goto320
  54. 480 ifx=44thens1$="":goto360
  55. 490 ifx=58orx>=127or(x>=65andx<=90)goto330
  56. 500 print:print"[198]ehler im [209]uellprogramm. [218]eile:"ze$:goto1310
  57. 502 :
  58. 504 :
  59. 506 rem -------------------------------
  60. 510 rem*** sortieren der sprungziele (feld ps$( ***
  61. 515 rem -------------------------------
  62. 516 :
  63. 520 fori=1tops
  64. 530 forj=itops
  65. 540 ifleft$(ps$(i),5)<left$(ps$(j),5)goto560
  66. 550 ps$(0)=ps$(i):ps$(i)=ps$(j):ps$(j)=ps$(0)
  67. 560 nextj
  68. 570 nexti
  69. 574 :
  70. 575 rem--------------------------------
  71. 576 rem   ausgabe spruenge + sprungziele
  72. 577 rem--------------------------------
  73. 578 :
  74. 580 open1,dv,7:print#1,"[208]rogrammname: "na$:print#1
  75. 590 print#1,"sprungtabelle           "
  76. 600 print#1,"--------------------------"
  77. 605 print#1,"zeile :   sprung auf zeile      ":print#1
  78. 610 fori=1tosp
  79. 620 ifleft$(sp$(i-1),5)=left$(sp$(i),5)thenprint#1,spc(7)mid$(sp$(i),7):goto640
  80. 630 print#1," "sp$(i)
  81. 640 nexti:print#1
  82. 645 print#1,"zeile :   wird angesprungen von":print#1
  83. 650 ps$(0)="":fori=2tops
  84. 660 ifleft$(ps$(i-1),6)<>left$(ps$(i),6)thenprint#1,ps$(i):goto680
  85. 670 print#1,spc(6);mid$(ps$(i),7)
  86. 680 nexti:close1
  87. 690 print"[206][146]ochmals/[215][146]eiter"
  88. 700 geta$:ifa$<>"n"anda$<>"w"goto700
  89. 710 ifa$="n"goto580
  90. 712 :
  91. 714 :
  92. 715 rem********************************
  93. 716 rem     pass 2 variable suchen
  94. 718 rem********************************
  95. 719 :
  96. 720 print"[147][208]ass 2 ([211]uchen der [214]ariablen)"
  97. 730 open1,8,2,na$+",p,r":gosub1290:gosub120
  98. 740 gosub120:gosub120:ze$=right$("     "+str$(x),5):print""ze$:y=0
  99. 750 gosub90
  100. 760 ifx=0goto740
  101. 770 ifx=34orx=131orx=143goto800
  102. 780 ifx>64andx<91goto850
  103. 790 goto750
  104. 800 ifx=131theny=1
  105. 810 gosub90:ifx=0goto740
  106. 820 ifx=34goto750
  107. 830 ifx=58andy=1goto750
  108. 840 goto810
  109. 850 v1$=a$
  110. 860 gosub90
  111. 870 ifx=36orx=37or(x>47andx<58)or(x>64andx<91)thenv1$=v1$+a$:goto860
  112. 880 ifx=40thenv1$=v1$+a$
  113. 890 v1$=left$(v1$+"    ",4)
  114. 900 fori=1tova
  115. 910 ifleft$(va$(i),4)<>v1$thennext:va=i:gosub130:va$(i)=v1$+"  :"
  116. 920 iflen(va$(i))>50thennext:va=va+1:i=va:gosub130:va$(i)=va$+"  :"
  117. 930 ifright$(va$(i),5)<>ze$thenva$(i)=va$(i)+" "+ze$
  118. 940 ifx=0goto740
  119. 950 goto750
  120. 952 :
  121. 954 :
  122. 956 rem -------------------------------
  123. 960 rem *** sortieren der variablen (feld va$( ***
  124. 965 rem -------------------------------
  125. 968 :
  126. 970 fori=1tova
  127. 980 forj=itova
  128. 990 ifleft$(va$(i),4)>left$(va$(j),4)goto1010
  129. 1000 va$(0)=va$(i):va$(i)=va$(j):va$(j)=va$(0)
  130. 1010 nextj
  131. 1020 nexti:va=va-1:i=va
  132. 1025 :
  133. 1030 print"[147][215]ollen [211]ie zu den [214]ariablen":print"[194]emerkungen eingeben?  ";
  134. 1040 geta$:ifa$="n"goto1180
  135. 1050 ifa$<>"j"goto1040
  136. 1060 print"[202]a"
  137. 1070 print"[214]ariablenname: ";left$(va$(i),4)
  138. 1073 printle$
  139. 1075 iflen(va$(i))>70thenprint"[145][145]"right$(va$(i),25)
  140. 1080 geta$:ifa$<>"[145]"anda$<>""anda$<>chr$(13)goto1080
  141. 1090 ifa$="[145]"theni=i+1:ifi>vatheni=va
  142. 1100 ifa$=""theni=i-1:ifi<1theni=1
  143. 1110 ifa$<>chr$(13)goto1070
  144. 1120 vr$=left$(va$(i),4):open1,0
  145. 1130 print"[212]ext:";:input#1,te$:print:close1:te$=left$(te$,25)
  146. 1140 fori=vato1step-1
  147. 1150 ifleft$(va$(i),4)<>vr$thennext:print"[206]icht vorhanden.":goto1070
  148. 1160 va$(i)=left$(va$(i)+le$,55)+right$(le$+te$,25):goto1030
  149. 1170 vr$=left$(vr$,4)
  150. 1174 ;
  151. 1175 rem-------------------------------
  152. 1176 rem     ausgabe variable
  153. 1177 rem-------------------------------
  154. 1180 print:open1,dv,7
  155. 1190 print#1,"liste der variablen     :"
  156. 1200 print#1,"-------------------------"
  157. 1210 fori=vato1step-1
  158. 1220 ifleft$(va$(i+1),4)<>left$(va$(i),4)thenprint#1,va$(i):goto1240
  159. 1230 print#1,spc(6);mid$(va$(i),7)
  160. 1240 nexti
  161. 1250 print"n[146]ochmals/w[146]eiter"
  162. 1260 geta$:ifa$<>"n"anda$<>"w"goto1260
  163. 1263 ifa$="n"goto1190
  164. 1266 print"[214]ariablenliste ohne [218]eilennummer (j/n)"
  165. 1267 getr$:ifr$=""then1267
  166. 1268 ifr$<>"j"thenprint:print"ende":goto1310
  167. 1269 print#1:print#1:print#1,"[214]ariablenliste ohne [218]eilennummer"
  168. 1270 print#1,"-------------------------------"
  169. 1271 fori=vato1step-1
  170. 1272 iflen(va$(i))>70thenprint#1,left$(va$(i),8);right$(va$(i),25):goto1274
  171. 1273 print#1,left$(va$(i),8)
  172. 1274 nexti
  173. 1280 goto1310
  174. 1290 input#2,a$,b$:ifa$="00"thenreturn
  175. 1300 print:print"[196]isk-[197]rror: ";b$
  176. 1310 close1:close2:end
  177.