home *** CD-ROM | disk | FTP | other *** search
/ 64'er Special 41 / 64er_Magazin_Sonderheft_41_19xx_Markt__Technik_de.d64 / eddi (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  3KB  |  139 lines

  1. 10 rem eddi - diskmonitor/editor
  2. 50 print"[147][144]":poke53280,14:poke53281,14
  3. 60 gosub10000
  4. 70 open1,8,15,"i0":open2,8,2,"#"
  5. 80 print"[147] e d d i  -  hauptmenue"
  6. 85 he$="byte      dec   hex   bin        asc":poke650,128
  7. 90 print" [197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197]"
  8. 100 print:print:print
  9. 110 print"(f1) - scrolling vorwaerts":print
  10. 120 print"(f2) - scrolling rueckwaerts":print
  11. 130 print"(f3) - block lesen":print
  12. 140 print"(f4) - block schreiben":print
  13. 150 print"(f5) - editor einschalten":print
  14. 160 print"(f6) - diskette wechseln":print
  15. 170 print"(f7) - rueckkehr ins menue":print
  16. 180 print"(f8) - programmende"
  17. 190 po=1:goto 9000
  18. 1000 rem eddi an
  19. 1010 x=0:y=0
  20. 1020 fory=eto255step16
  21. 1030 po=2:print"[147]editor-modus fuer track"t" sektor"s
  22. 1040 print:printhe$:print
  23. 1050 forx=ytoy+15:printx:nextx
  24. 1060 print"":forx=ytoy+15
  25. 1065 da=peek(50000+x):gosub7030:printx,ou$
  26. 1070 input"[145]";in$:ifin$=""then1090
  27. 1072 ifleft$(in$,1)="^"thenprint"":goto9000
  28. 1073 ifleft$(in$,1)="_"thenprint"":goto1125
  29. 1075 da=val(left$(in$,3)):ifda>255orda<0thenprint"[145][145]":goto1065
  30. 1080 poke50000+x,da
  31. 1120 nextx:print
  32. 1125 print"eingabe ?";
  33. 1130 geta$:ifa$=""then1130
  34. 1140 ifa$="[133]"then1200
  35. 1150 ifa$="[137]"then1300
  36. 1160 ifa$<>" "thennexty
  37. 1170 po=1:goto9000
  38. 1200 print"":printe".....???"
  39. 1210 geta$:ifa$=""then1210
  40. 1215 ifa$="[137]"then1300
  41. 1220 ifa$<>"[133]"then1020
  42. 1230 e=e+16:ife>255thene=0
  43. 1240 goto1200
  44. 1300 print"":printe".....???"
  45. 1310 geta$:ifa$=""then1310
  46. 1315 ifa$="[133]"then1200
  47. 1320 ifa$<>"[137]"then1020
  48. 1330 e=e-16:ife<0thene=240
  49. 1340 goto1300
  50. 2000 rem diskettenwechsel
  51. 2010 print"[147]bitte neue diskette einlegen"
  52. 2020 geta$:ifa$=""then2020
  53. 2030 run
  54. 3000 rem block read
  55. 3010 po=2:print"[147]   block lesen":print:print
  56. 3020 input"track, sektor ";t,s
  57. 3025 ift<1ort>35then3010
  58. 3030 print#1,"u1 2 0"t;s
  59. 3035 ifst<>0thenprint:goto9000
  60. 3040 print#1,"b-p 2 0"
  61. 3050 sys49152:e=0:x=0:y=0:goto5010
  62. 3060 fory=eto255step16
  63. 3070 print"[147]track"t" sektor"s
  64. 3080 print:printhe$:print
  65. 3090 forx=ytoy+15:da=peek(50000+x):gosub7030:printx,ou$:nextx
  66. 3100 goto9000
  67. 4000 rem block write
  68. 4010 po=1:print:print:input"[147]track, sektor";t,s:print"[144]"
  69. 4020 print#1,"b-p 2 0"
  70. 4030 sys49177
  71. 4040 print#1,"u2 2 0"t;s
  72. 4050 goto9000
  73. 5000 rem scroll forward
  74. 5010 e=x:ife>255thenx=0:e=0
  75. 5020 print"[147]track"t" sektor"s
  76. 5030 print:printhe$:print
  77. 5040 da=peek(50000+e):gosub7030:printe,ou$
  78. 5050 x=x+16
  79. 5060 geta$:ifa$=""then5060
  80. 5070 ifa$="[133]"then5010
  81. 5075 ifa$="[137]"thenx=x-16:goto6010
  82. 5077 ifa$="[135]"then1000
  83. 5080 goto3060
  84. 6000 rem scroll backward
  85. 6010 e=x:ife<0thene=240:x=240
  86. 6020 print"[147]track"t" sektor"s
  87. 6030 print:printhe$:print
  88. 6040 da=peek(50000+e):gosub7030:printe,ou$
  89. 6050 x=x-16
  90. 6060 geta$:ifa$=""then6060
  91. 6070 ifa$="[137]"then6010
  92. 6075 ifa$="[133]"thenx=x+16:goto5010
  93. 6077 ifa$="[135]"then1000
  94. 6080 goto3060
  95. 7000 rem bereitstellung des strings
  96. 7010 rem da/da$ sind ausgabewerte                h$,d$,b$,c$ sind zwischenwerte
  97. 7020 rem ou,ou$ sind endergebnisse
  98. 7030 ifda>31andda<128orda>159andda<256thenc$=chr$(da):goto7040
  99. 7035 c$="."
  100. 7040 xx$="000":d$=right$(str$(da),len(str$(da))-1)
  101. 7045 d$=left$(xx$,3-len(d$))+d$
  102. 7050 xx$="123456789abcdef":h$=""
  103. 7060 hh=int(da/16):hl=da-hh*16
  104. 7070 ifhhthenh$=h$+mid$(xx$,hh,1):goto7080
  105. 7075 h$=h$+"0"
  106. 7080 ifhlthenh$=h$+mid$(xx$,hl,1):goto7090
  107. 7085 h$=h$+"0"
  108. 7090 b$="":forq=7to0step-1
  109. 7100 if(daand(2^q))<>0thenb$=b$+"1":next:goto7110
  110. 7105 b$=b$+"0":next
  111. 7110 ou$=d$+"   "+h$+"    "+b$+"   "+c$
  112. 7120 return
  113. 8999 end
  114. 9000 rem get kommando
  115. 9010 print:print"kommando ?  ";
  116. 9020 print"[157][191]";:forw=1to75:getko$:ifko$<>""then9090
  117. 9030 nextw
  118. 9040 print"[157][191][146]";:forw=1to75:getko$:ifko$<>""then9090
  119. 9050 nextw
  120. 9060 goto9020
  121. 9090 ifko$="@"then9200
  122. 9100 if asc(ko$)>140orasc(ko$)<133then9020
  123. 9110 ko=asc(ko$)-132
  124. 9120 on po goto9130,9140,20000
  125. 9130 on ko goto9020,3000,1000,80,9020,4000,2000,20000
  126. 9140 on ko goto5000,3000,1000,80,6000,4000,2000,20000
  127. 9200 print
  128. 9210 get#1,a$:printa$;:ifst<>64then9210
  129. 9220 goto 9000
  130. 9999 end
  131. 10000 data160,0,169,8,32,9,237,169,98,32,199,237,32,19,238,153,80,195,200
  132. 10010 data208,247,32,239,237,96,160,0,169,8,32,12,237,169,98,32,185,237
  133. 10020 data185,80,195,32,221,237,200,208,247,32,254,237,96,0,0
  134. 10030 restore:forz=1to51:reada:poke49151+z,a:next
  135. 10040 rem get:49152; write:49177
  136. 10050 return
  137. 20000 print:print:print"[154]auf wiedersehen !!!":print:poke53280,14:poke53281,6
  138. 20001 print"und dankeschoen !"
  139.