home *** CD-ROM | disk | FTP | other *** search
/ Commodore Disc 21 / Commodore_Disc_21_19xx_-_de.d64 / schreibschutz (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  4KB  |  133 lines

  1. 1 rem disk-schreibschutz
  2. 2 rem commodore disc/tc
  3. 3 print"[147]":q$=chr$(13)
  4. 4 u$="                                        ":kb=198:sf=653:kl=203
  5. 5 poke53280,1:poke53281,1:f1=4:f7=3
  6. 6 gosub117:goto102
  7. 7 print#15,"u1";2;0;t;s:goto65
  8. 8 print#15,"b-p 2 0":print#15,"u2";2;0;t;s:goto65
  9. 9 t=peek(681):s=peek(682):return
  10. 10 rem
  11. 11 print"[147]alle files schuetzen":printu$:gosub64:t=18:s=1
  12. 12 p=2:gosub7
  13. 13 get#2,a$:t1=asc(a$+chr$(0)):get#2,a$:s1=asc(a$+chr$(0))
  14. 14 fori=0to7:print#15,"b-p";2;p+32*i
  15. 15 get#2,a$:a=asc(a$+chr$(0)):ifa=0then18
  16. 16 ifaand64then18
  17. 17 print#15,"b-p";2;p+32*i:print#2,chr$(aor64);
  18. 18 next:gosub8:ifethenreturn
  19. 19 print"spur"t"sektor"s" ist geschuetzt":t=t1:s=s1:iftthen12
  20. 20 gosub71:gosub72:return
  21. 21 h$=chr$(18):print"[147]zum anhalten[146] shift druecken"
  22. 22 gosub64:print#15,"m-r"chr$(144)chr$(7)chr$(23)
  23. 23 fori=0to22:get#15,a$:h$=h$+(a$+chr$(0)):next:printh$"[144]":poke140,1:t=18:s=1
  24. 24 gosub7:sys828:gosub9:ifpeek(sf)thenwaitsf,1,1
  25. 25 iftthen24
  26. 26 print#15,"m-r"chr$(250)chr$(2):get#15,lo$:print#15,"m-r"chr$(252)chr$(2)
  27. 27 get#15,hi$:printasc(lo$+chr$(0))+256*asc(hi$+chr$(0))" bloecke frei"
  28. 28 gosub71:gosub72:poke140,0:return
  29. 29 print"<f1> hauptmenue       <f7> directory"
  30. 30 print"file-name "cu$;:pokekb,0:f$=""
  31. 31 kq=peek(kl):geta$:ifa$=""andkq=64then31
  32. 32 ifkq=f1orkq=f7thenprintchr$(20):return
  33. 33 ifa$=chr$(20)andf$=""then31
  34. 34 ifa$=chr$(13)andf$<>""thenprintchr$(20):return
  35. 35 ifa$=chr$(13)andf$=""then31
  36. 36 ifa$=chr$(20)thenprintchr$(20)a$cu$;:f$=left$(f$,len(f$)-1):goto31
  37. 37 printchr$(20)a$cu$;:f$=f$+a$:goto31
  38. 38 print"[147]";
  39. 39 print"file schuetzen":printu$
  40. 40 gosub29:ifkq=f1thenreturn
  41. 41 ifkq=f7thengosub21:goto39
  42. 42 poke679,1:gosub75:gosub64:t=18:s=1
  43. 43 gosub7:sys828:a=peek(252):ifathen46
  44. 44 gosub9:iftthen43
  45. 45 print"file nicht gefunden[144]":goto40
  46. 46 if(aand64)thenprintf$:print" ist bereits geschuetzt":gosub71:gosub72:goto50
  47. 47 p=peek(255):gosub7:print#15,"b-p";2;p:print#2,chr$(aor64);
  48. 48 gosub8:ifethen38
  49. 49 gosub71:printf$:print"ist geschuetzt":gosub72
  50. 50 poke679,0:goto38
  51. 51 print"[147]";
  52. 52 print"file freigeben":printu$
  53. 53 gosub29:ifkq=f1thenreturn
  54. 54 ifkq=f7thengosub21:goto52
  55. 55 poke679,1:gosub75:gosub64:t=18:s=1
  56. 56 gosub7:sys828:a=peek(252):ifathen59
  57. 57 gosub9:iftthen56
  58. 58 print"file nicht gefunden[144]":goto53
  59. 59 if(aand64)=0thenprintf$q$"ist bereits freigegeben"":gosub730:gosub740:goto640
  60. 60 p[178][194](255):[141]7:[152]15,"b-p";2;p:[152]2,[199](a[175]135);
  61. 61 [141]8:[139]e[167]51
  62. 62 [141]71:[153]f$:[153]"ist freigegeben":[141]72
  63. 63 [151]679,0:[137]51
  64. 64 [160]2:[160]15:[159]15,8,15,"i0":[159]2,8,2,"#"
  65. 65 [132]15,e,em$,et,es
  66. 66 [139]e[178]73[176]e[178]26[167][141]71:[137]69
  67. 67 [139]e[167][153]"diskfehler:":[153]e","em$","et","es"stop":[141]71:[128]
  68. 68 [142]
  69. 69 [139]e[178]73[167][153]"diskette ist geschuetzt":[141]72:[142]
  70. 70 [153]"schreibkerbe nicht vorhanden/ueberklebt":[141]72:[142]
  71. 71 [160]2:[160]15:[142]
  72. 72 [153]"taste druecken":[151]kb,0
  73. 73 kq[178][194](kl):[161]a$:[139]a$[178]""[175]kq[178]64[167]73
  74. 74 [142]
  75. 75 [139][195](f$)[179]16[167]f$[178]f$[170][199](160):[137]75
  76. 76 [129]i[178]1[164][195](f$):[151]683[170]i,[198]([202](f$,i,1)):[130]:[151]700,0:[142]
  77. 77 [153]"loadgesamte disk schuetzen":[153]u$
  78. 78 [153]"diskette einlegen  <f1>=abbruch":[129]d[178]1[164]900:[130]:[141]72
  79. 79 [139]kq[178]f1[167][142]
  80. 80 [141]64:t[178]18:s[178]0:[141]7:[152]15,"b-p 2 2"
  81. 81 [152]2,[199](66);:[152]15,"b-p 2 166":[152]2,[199](66);:[141]8:[139]e[167]77
  82. 82 [141]71:[141]64:[141]71
  83. 83 [153]"diskette ist jetzt schreibgeschuetzt":[141]72:[142]
  84. 84 [153]"load";
  85. 85 [153]"disk-file loeschen":[153]u$
  86. 86 [141]29:[139]kq[178]f1[167][142]
  87. 87 [139]kq[178]f7[167][141]21:[137]85
  88. 88 [133]"sind sie sicher";a$:[139]a$[179][177]"j"[167]84
  89. 89 [141]64:[152]15,"s0:"[170]f$:[132]15,e,em$,et,es:[139]e[177]1[167][141]66:[137]84
  90. 90 [141]71:[139]et[178]0[167][153]"file ist geschuetzt bzw.nicht auf diskstop":[141]72:[137]84
  91. 91 [139]et[177]1[167][153]et;em$:[141]72:[137]84
  92. 92 [153]f$:[153]" ist geloescht.":[141]72:[137]84
  93. 93 [153]"loadgesamte disk freigeben":[153]u$
  94. 94 [153]"diskette einlegen  <f1>=abbruch":[129]d[178]1[164]900:[130]:[141]72
  95. 95 [139]kq[178]f1[167][142]
  96. 96 [141]64:t[178]18:s[178]0:[141]7
  97. 97 [152]15,"m-w";[199](1);[199](1);[199](1);[199](65);
  98. 98 [152]15,"b-p 2 2":[152]2,[199](65);:[152]15,"b-p 2 166"
  99. 99 [152]2,[199](65);:[141]8:[139]e[167]93
  100. 100 [141]7:[141]71:[153]"disk ist freigegeben"
  101. 101 [141]72:[142]
  102. 102 [153]"loadstop"[163]5)"*** disk-schreibschutz ***":[153]u$
  103. 103 [153]" (1) directory
  104. 104 print" (2) alle files schuetzen
  105. 105 [153]" (3) einzelnes file schuetzen
  106. 106 print" (4) einzelnes file freigeben
  107. 107 [153]" (5) gesamte diskette schuetzen"
  108. 108 [153]" (6) gesamte diskette freigeben"
  109. 109 [153]" (7) file auf disk loeschen"
  110. 110 [153]" (8) programm-ende
  111. 111 print""u$
  112. 112 geta$:ifa$=""then112
  113. 113 c=val(a$):ifc<1orc>8then112
  114. 114 oncgosub21,11,38,51,77,93,84,116
  115. 115 goto102
  116. 116 close2:close15:end
  117. 117 poke679,0:poke140,0:cu$=chr$(161)+chr$(144)
  118. 118 fori=828to1006:readd:pokei,d:next:return
  119. 119 data169,0,141,168,2,133,253,162,2,32,198,255,32
  120. 120 data228,255,141,169,2,32,228,255,141,170,2,230,253
  121. 121 data230,253,32,228,255,133,252,165,253,133,255,32,228
  122. 122 data255,32,228,255,230,253,230,253,160,0,32,228,255
  123. 123 data230,253,153,189,2,200,24,192,16,144,242,160,243
  124. 124 data32,228,255,230,253,165,144,240,3,141,168,2,200
  125. 125 data208,241,165,252,208,7,173,168,2,208,22,240,191
  126. 126 data165,140,240,3,32,199,3,173,167,2,240,3,32
  127. 127 data175,3,173,168,2,240,171,32,204,255,96,160,0
  128. 128 data185,172,2,240,8,217,189,2,208,7,200,208,243
  129. 129 data238,168,2,96,169,0,133,252
  130. 130 data96,160,0,185,189,2,240,6,32,210,255,200,208
  131. 131 data245,165,252,41,64,240,10,169,144,32,210,255,169,95,32,210,255,169
  132. 132 data13,32,210,255,169,144,32,210,255,96
  133.