home *** CD-ROM | disk | FTP | other *** search
/ Ozsi 11 / Ozsi_11_1998_Tide_Side_B.d64 / diskdoc.v1.5_tde (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  8KB  |  239 lines

  1. 0 dimt(35):forx=1to17:t(x)=20:next:forx=18to24:t(x)=18:next
  2. 1 forx=25to30:t(x)=17:next:forx=31to35:t(x)=16:next:dimd(256)
  3. 2 poke53280,11:poke53281,11:poke646,14:print""
  4. 3 print"[147][212][201][196][197](in-group)[196][201][211][203][196][207][195][212][207][210] [214]1([195])[205]icroshaft":print""
  5. 10 poke2020,20:poke2021,15:poke2022,13:poke2023,26
  6. 11 poke56295,5:poke56294,4:poke56293,8:poke56292,6
  7. 100 printtab(14)"[208]ick a [206]umber!":close2:f=0:ef=0
  8. 110 printtab(14)"[163][163][163][163][163][163][163][163][163][163][163][163][163][163]":close15
  9. 120 printtab(12)"1: [211]ave a [211]ector"
  10. 130 printtab(12)"2: [211]ave a [198]ile"
  11. 140 printtab(12)"3: [211]ave [197]ntire [196]isk"
  12. 150 printtab(12)"4: [210]ead [201]nstructions":poke198,0
  13. 155 printtab(12)"5: [197]xit [208]rogram":poke198,0
  14. 160 geti$:i=val(i$)
  15. 170 ifi<1ori>5then160
  16. 180 onigoto500,700,1200,1400,450
  17. 190 print"":forx=1to13
  18. 195 print"                                       ":next:print"[145][145][145][145][145][145][145][145][145][145][145][145][145][145]":return
  19. 198 return
  20. 200 poke631,5:poke198,1:return
  21. 210 input#15,e1,e$,e2,e3:ife1=0thenreturn
  22. 220 gosub190:print"         "e1;e$;e2;e3:forx=1to4000:next:gosub190:return
  23. 230 at=0:print#15,"m-w"chr$(10)chr$(0)chr$(2)chr$(t)chr$(s)
  24. 240 print#15,"m-w"chr$(2)chr$(0)chr$(1)chr$(code)
  25. 250 at=at+1:print#15,"m-r"chr$(2)chr$(0):get#15,e$:e=asc(e$+chr$(0))
  26. 260 ifat>500then290
  27. 270 ife>127then250
  28. 280 return
  29. 290 e$="[213]nrecoverable format error"
  30. 292 ife=3thene$="[195]annot find track"
  31. 293 ife=8thene$="[215]rite protect on"
  32. 310 e=e+18:gosub190:print""e;e$;t;s
  33. 320 print"[211]orry, unable to recover this sector":goto670
  34. 330 tt=0
  35. 340 tt=tt+1:iftt>3thenef=ef+1:return
  36. 345 print#15,"u;":forx=1to1000:next
  37. 350 close2:close15:open15,8,15,"i0"
  38. 360 gosub210:ife1<>0then100
  39. 370 open2,8,2,"#2":gosub210:ife1<>0then100
  40. 380 code=176:gosub230:gosub198:ife<>1then340
  41. 390 code=128:gosub230:gosub198:ife<>1then340
  42. 400 return
  43. 450 gosub190:poke198,1:sys64738
  44. 500 gosub190:printtab(14)"[211]ave a [211]ector"
  45. 510 printtab(14)"[163][163][163][163][163][163][163][163][163][163][163][163][163]":t=-1:s=-1
  46. 520 print"[201]nput track desired: ";:gosub200:inputt
  47. 525 ift<1thengosub190:goto2
  48. 530 ift>35thengosub190:printtab(14)"[201]nvalid track!":forx=1to4000:next:goto500
  49. 540 print"[201]nput sector desired:";:gosub200:inputs
  50. 550 ifs<0thengosub190:goto2
  51. 560 ifs>t(t)thengosub190:printtab(14)"[201]nvalid sector!":forx=1to4000:next:goto500
  52. 570 gosub190:printtab(15)"[215]orking..."
  53. 575 close15:open15,8,15,"u;":forx=1to1000:next
  54. 580 close15:open15,8,15,"i0":gosub210:ife1<>0then2
  55. 585 open2,8,2,"#2":gosub210:ife1<>0then2
  56. 590 printtab(7)"[210]eading track"t"sector"s
  57. 600 code=176:gosub230:ife<>1ande<>4ande<>5thengosub330:iftt<3then600
  58. 601 ife<>1ande<>4ande<>5then290
  59. 605 gosub198
  60. 610 code=128:gosub230
  61. 620 ife=5then650
  62. 625 ife=4then640
  63. 630 ife<>1thengosub330:iftt<3then600
  64. 631 ife<>1then290
  65. 635 print"    [206]o errors on track"t"sector"s"!":goto670
  66. 640 print#15,"m-w"chr$(71)chr$(0)chr$(1)chr$(7)
  67. 650 code=144:gosub230:ife<>1thengosub330:iftt<3then600
  68. 651 ife<>1then290
  69. 660 printtab(8)"[212]rack"t"sector"s"saved!"
  70. 670 forx=1to5000:next
  71. 680 iff=0thenclose2:close15:gosub190:goto2
  72. 690 iff=1then820
  73. 700 gosub190:printtab(14)"[211]ave a [198]ile":printtab(14)"[163][163][163][163][163][163][163][163][163][163][163]"
  74. 705 f$="":lt=0:ls=0:ef=0
  75. 710 print"[201]nput filename:";:gosub200:inputf$
  76. 720 iff$=""thengosub190:goto2
  77. 730 close2:close15:open15,8,15,"u;":forx=1to1000:next
  78. 732 print#15,"i0":gosub210:ife1<>0then2
  79. 735 open2,8,2,"0:"+f$
  80. 740 gosub210:ife1=62ore1=21then700
  81. 741 ife1=22ore1=23thent=e2:s=e3:goto770
  82. 742 ife1<>0thenprinttab(10)"[195]annot save this file!":f=0:goto670
  83. 745 get#2,a$,b$
  84. 750 print#15,"m-r"chr$(24)chr$(0):get#15,t$:t=asc(t$+chr$(0))
  85. 760 print#15,"m-r"chr$(25)chr$(0):get#15,s$:s=asc(s$+chr$(0))
  86. 770 close2:open2,8,2,"#2"
  87. 771 p=11-(len(f$)/2):ifp<1thenp=0
  88. 775 f=1:gosub190:printtab(p+5)"[211]aving "chr$(34)f$chr$(34)
  89. 776 print"       [210]eading track   [157][157][157]"t"[157] sector   [157][157][157]"s
  90. 780 ift=0thenprint"               [197]nd of file":f=0
  91. 790 ift=0andef>0thenprinttab(p)""chr$(34)f$chr$(34)" has been saved!":goto670
  92. 791 ift=0andef<1thenprinttab(p+2)"[206]o errors in "chr$(34)f$chr$(34):goto670
  93. 792 ift>35ors>t(t)then940
  94. 800 print"[145]       [210]eading track   [157][157][157]"t"[157] sector   [157][157][157]"s
  95. 820 code=176:gosub230:ife<>1thengosub330:iftt<3then820
  96. 825 gosub198
  97. 830 code=128:gosub230
  98. 840 ife=4thenprint#15,"m-w"chr$(71)chr$(0)chr$(1)chr$(7):ef=ef+1:goto870
  99. 850 ife=5thenef=ef+1:goto870
  100. 860 ife<>1thengosub330:iftt<3then820
  101. 865 ife<>1thennt=0:ns=0:goto920
  102. 870 print#15,"m-r"chr$(0)chr$(5):get#15,nt$
  103. 880 print#15,"m-r"chr$(1)chr$(5):get#15,ns$
  104. 890 nt=asc(nt$+chr$(0)):ns=asc(ns$+chr$(0))
  105. 900 remprint"nt="nt,"ns="ns:goto940
  106. 910 remcode=176:gosub230
  107. 915 gosub198
  108. 920 code=144:gosub230:ife<>1thengosub330:iftt<3then920
  109. 925 gosub198
  110. 930 ife=1thenlt=t:t=nt:ls=s:s=ns:goto780
  111. 936 ife=8thengosub190:printtab(10)"[210]emove [215]rite [208]rotect!":f=0:goto670
  112. 937 ife<>1thengosub330:iftt<3then920
  113. 940 gosub190:printtab(7)"[213]nrecoverable format error."
  114. 950 printtab(6)"[198]ixing sector links to allow"
  115. 960 printtab(5)"file recovery up to this point."
  116. 965 printtab(13)"([194]e patient!)"
  117. 970 t=lt:s=ls:code=176:gosub230:ife<>1thengosub330:goto970
  118. 980 code=128:gosub230:ife<>1then970
  119. 990 forx=0to255
  120. 1000 print#15,"m-r"chr$(x)chr$(5)
  121. 1010 get#15,d$:d(x)=asc(d$+chr$(0))
  122. 1020 next:x=0:y=0:d=0
  123. 1030 x=x+1:ifx>255then1060
  124. 1040 ifd(x)=dtheny=x
  125. 1050 goto1030
  126. 1060 ify=0andd=0thend=13:x=0:goto1030
  127. 1065 ify=0andd=13theny=255:goto1100
  128. 1070 d(0)=0:ify>253then1100
  129. 1090 d(1)=y+2:d(y)=d:d(y+1)=d:d(y+2)=d:goto1110
  130. 1100 d(1)=y-2:d(y)=d:d(y-1)=d:d(y-2)=d
  131. 1110 forx=0to255
  132. 1120 print#15,"m-w"chr$(x)chr$(5)chr$(1)chr$(d(x)):next
  133. 1130 code=144:gosub230
  134. 1135 ife<>1thengosub330:iftt<3then970
  135. 1136 ife<>1thenf=0:goto670
  136. 1140 gosub190:print:printtab(3)"[198]ile has been [208][193][210][212][201][193][204][204][217] recovered."
  137. 1150 print:printtab(2)"[198]ile copy all files to another disk;"
  138. 1160 printtab(3)"[212]here are permanent format errors"
  139. 1170 printtab(3)"that cannot be corrected without"
  140. 1180 printtab(8)"re-formatting the disk."
  141. 1190 print:printtab(12)"[208]ress any key":poke198,0:wait198,1
  142. 1195 gosub190:goto2
  143. 1200 gosub190:printtab(12)"[211]ave entire disk"
  144. 1210 printtab(12)"[163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
  145. 1220 printtab(5)"[201]nsert disk and press  [210][197][212][213][210][206] ":poke198,0
  146. 1230 geta$:ifa$=chr$(13)then1240
  147. 1235 ifa$<>""anda$<>chr$(13)thengosub190:goto2
  148. 1236 goto1230
  149. 1240 close2:close15:open15,8,15,"u;":forx=1to1000:next
  150. 1245 close15:open15,8,15,"i0":gosub210
  151. 1250 ife1<>0then2
  152. 1255 open2,8,2,"#2":gosub210:ife1<>0then2
  153. 1260 re=0:fe=0:we=0
  154. 1265 print"[145]                                      "
  155. 1270 fort=1to35
  156. 1275 fors=0tot(t)
  157. 1280 printtab(5)"[145][215]orking on track   [157][157][157]"t"[157] sector   [157][157][157]"s
  158. 1285 code=176:gosub230:ife<>1ande<>4ande<>5thengosub330:iftt>3thenfe=fe+1:goto1330
  159. 1295 ife<>1ande<>4ande<>5thenfe=fe+1:goto1330
  160. 1300 code=128:gosub230:ife<>1ande<>4ande<>5thengosub330:iftt<3then1300
  161. 1305 ife<>1ande<>4ande<>5thenre=re+1:goto1330
  162. 1310 ife=4thenprint#15,"m-w"chr$(71)chr$(0)chr$(1)chr$(7)
  163. 1320 code=144:gosub230:ife>8thenwe=we+1:goto1330
  164. 1321 ife<>1thengosub330:code=144:gosub230
  165. 1325 ife<>1thenwe=we+1
  166. 1330 ife=3thens=t(t)+1
  167. 1335 nexts:nextt
  168. 1340 gosub190:printtab(10)"[198]ormat errors:"fe
  169. 1350 printtab(5)"[213]nrecoverable read errors:"re
  170. 1360 printtab(10)"[211]ectors saved:"683-we
  171. 1370 f=0:forx=1to5000:next:goto670
  172. 1400 c$="":q$=chr$(34):gosub190
  173. 1410 print"[159]"c$"   [212]his program was taken from the "
  174. 1420 print"routines in the book [201]nside [195]ommodore"
  175. 1430 print"[196][207][211].[201] don't know who the original guy"
  176. 1440 print"was who coded it,but in anycase [201] have "
  177. 1450 print"improved it and it now works 100%.     "
  178. 1460 print"   [212]his program will correct "q$"soft"q$
  179. 1470 print"read errors on your disks. [212]hese are"
  180. 1480 print"#22 and #23 read errors. [212]he other "
  181. 1490 print"errors such as #20, #21, #27, #29, etc."
  182. 1500 print"are created during formatting, and "
  183. 1510 print"can't be repaired except by formatting"
  184. 1520 print"the disk again."
  185. 1530 print"             [208]ress any key":poke198,0:wait198,1
  186. 1540 gosub190:print"   [196]uring the testing of this program"
  187. 1550 print"it was discovered that many of the copy"
  188. 1560 print"programs do not faithfully duplicate"
  189. 1570 print"#22 or #23 errors. [212]hese errors hide a"
  190. 1580 printq$"hard"q$" error underneath the "q$"soft"q$
  191. 1590 print"error. [212]hese can't be repaired, either."
  192. 1600 print"    [212]his program is intended to save"
  193. 1610 print"your files if you should develop a read"
  194. 1620 print"error. [201]f you can't load or read a file"
  195. 1630 print"because of a read error, this program"
  196. 1635 print"will let you get that file back again."
  197. 1640 poke198,0:wait198,1
  198. 1650 gosub190:print"   [201]f you have a bad file, you should"
  199. 1660 print"use the "q$"[211]ave a [198]ile"q$" option. [212]his"
  200. 1670 print"will trace the file, and correct"
  201. 1680 printq$"soft"q$" errors as they are found. [201]f"
  202. 1690 print"any "q$"hard"q$" errors are found, the"
  203. 1700 print"file will be severed at that point,"
  204. 1710 print"since a hard error cannot be repaired."
  205. 1720 print"   [212]his will let you retreive at least"
  206. 1730 print"a portion of the bad file. [201]f it is a"
  207. 1740 print"[194][193][211][201][195] program, the line links will be"
  208. 1750 print"corrected before the bad portion of the"
  209. 1760 print"file is severed."
  210. 1770 poke198,0:wait198,1
  211. 1780 gosub190:print"   [212]he "q$"[211]ave [197]ntire [196]isk"q$" option"
  212. 1790 print"takes a long time, but may be useful"
  213. 1800 print"if you don't know where the read errors"
  214. 1810 print"are on the disk. [200]owever, this can take"
  215. 1820 print"a [214][197][210][217] long time, especially if there"
  216. 1830 print"are a number of "q$"hard"q$" errors on the"
  217. 1840 print"disk. [215]hen a "q$"hard"q$" error is found, the"
  218. 1850 print"program resets and then initializes the"
  219. 1860 print"drive and tries again; up to 3 times"
  220. 1870 print"per sector before giving up and then"
  221. 1880 print"accepting the error."
  222. 1890 poke198,0:wait198,1
  223. 1900 gosub190:print"   [212]he "q$"[211]ave a [198]ile"q$" option is of"
  224. 1910 print"main interest. [201]t is the only option"
  225. 1920 print"that will allow you to recover a file"
  226. 1930 print"with "q$"soft"q$" errors. [212]he errors will"
  227. 1940 print"be corrected as the program steps thru"
  228. 1950 print"the file. [201]f a "q$"hard"q$" error is found,"
  229. 1960 print"the preceeding sector's information is"
  230. 1970 print"corrected to sever the bad portion of "
  231. 1980 print"the file from the good portion."
  232. 1985 print"[201][198] [217][207][213] [193][210][197] [193] [195][207][196][197][210] and want to [211][215][193][208]code"
  233. 1986 print"[215]rite to [156]-[212][207][205][218]-.[208].[207].[194]ox 64.[197][213][206][199][193][201] [195][210][203]."
  234. 1987 print"[206].[211].[215]. 2441. [193][213][211][212][210][193][204][201][193].([196]isk=100% [210]eply)"
  235. 1990 poke198,0:wait198,1
  236. 2000 print"                                      ":gosub190:goto2
  237. 2001 rem*(NULL)his program is asc(NULL)valval(NULL)atn(NULL)val
  238. 2002 rem*another (NULL)right$len(NULL)(NULL)(NULL)left$atnasc(NULL) product in 98
  239.