start tok64 d64-ApIOQF 0 dn=8:REM device # 2 POKE53280,15:POKE53281,12:DIMa$,i,s$,t$,cc,b,ss,e$,j,te,a:GOTO78 4 GETa$:IFa$>""THENPRINT"{home}{down*24}{space*39}{home}";:cc=293:RETURN 6 IFa$=""THEN252 8 RETURN 9 t3=t2:t2=t1:t1=VAL(t$):s3=s2:s2=s1:s1=VAL(s$):RETURN 10 IFi<0THENi=280+i:IFi>255THENi=i-40 12 IFi>255THENi=i-INT(i/40)*40 14 PRINT"{home}{down*21}"TAB(23)PEEK(ss+i)"{left}{space*3}" 15 PRINT"{home}{down*22}"TAB(23)i"{left}{space*3}" 16 PRINT"{home}{down*21}"TAB(14)"value:{down}{left*6}position:" 18 FORj=1TO2:POKEi+ss,(PEEK(i+ss)+128)AND255:FORd=0TO1:NEXTd,j 19 IFPEEK(197)=40ANDpf=0THENGOSUB9:GOTO280 20 IFPEEK(197)=43ANDpf=0THENGOSUB9:GOTO282 21 GOSUB4:IFa$=""THEN18 22 IFpfTHEN66 24 IFa$="{right}"THENi=(i+1)AND255:GOTO10 26 IFa$="{left}"THENi=(i-1)AND255:GOTO10 28 IFa$="{up}"THENi=i-40:GOTO10 30 IFa$="{down}"THENi=i+40:GOTO10 32 IFa$="{home}"THENi=0:GOTO10 34 IFa$="n"THENGOSUB9:t$=STR$(PEEK(ss)):s$=STR$(PEEK(ss+1)):GOTO128 36 IFa$="j"THENGOSUB9:t$=STR$(PEEK(ss+i)):s$=STR$(PEEK(ss+i+1)):GOTO128 37 IFa$="J"ORa$="N"THENt$=STR$(t1):s$=STR$(s1):t1=t2:s1=s2:t2=t3:s2=s3:GOTO128 38 IFa$="q"THENPRINT#15,"i0":RUN 44 IFa$="r"THEN174 45 IFa$="c"THENCLOSE2:GOTO360 46 IFa$="b"THENGOSUB9:GOTO116 48 IFa$="t"THENPRINT"{home}{down*10}":GOSUB218:PRINT"{down*14}":GOSUB218:GOTO64 50 IFa$=CHR$(3)THEN74 52 IFa$<>"@"THEN10 54 IFi<0THENi=280+i:IFi>255THENi=i-40 56 IFi>255THENi=i-INT(i/40)*40 58 PRINT"{home}{down*21}"TAB(23)PEEK(ss+i)"{left}{space*3}" 59 PRINT"{home}{down*22}"TAB(23)i"{left}{space*3}":POKE198,0 60 PRINT"{home}{down*21}"TAB(10)"NEW value:{space*4}";:INPUT#9,b$:PRINT 62 PRINT"{up}"TAB(10)"{space*3}":b=VAL(b$):GOTO166 64 PRINT"{home}{down*15}{space*5}Press {reverse on}RETURN{reverse off} to end text mode.":pf=1:GETa$:GOTO10 66 IFa$=CHR$(13)THENpf=0:PRINT"{home}{down*10}":GOSUB202:GOTO10 68 IFa$=""THEN20 70 b=ASC(a$):GOTO168 72 PRINT"{home}{down*10}":GOSUB202:GOTO10 74 PRINT#15,"i0":RUN 78 a=828:tem=a:REM fileread 80 POKE210,INT(a/256):POKE209,a-256*PEEK(210):POKE211,0 82 PRINT"{reverse on}"CHR$(34)CHR$(34)CHR$(20)"{reverse off}b {reverse on}F{cm b} {reverse off}@ {reverse on}{cm @}{cm b}y{reverse off}{cm u}d{reverse on}HP{cm y}{reverse off}L{reverse on}L{cm b}" 84 POKE788,52:REM stop key disable 86 PRINT"{ct n}{light green}"; 88 ss=1024+120:i=0:b=0:j=0 90 a$="":e$="":t$="":s$="" 91 PRINT"{clear}{dark gray}{space*12}Disk Doctor PLUS{down}" 92 PRINT"(with sector copy{space*2}&{space*2}scan wrap-around){down*3}" 93 PRINT"{space*2}Please put the SICK DISK in drive 0." 94 PRINT"{down*2} If you modify the directory, VALIDATE" 96 PRINT"the disk (when done) to update the BAM." 98 PRINT"{down*2}{space*5}Note: Disk device number is"dn"{left}.{down*2}" 100 PRINT"{down*2}{space*7}{reverse on}Press ANY KEY to continue" 101 t$=" 18":s$=" 1" 102 GOSUB4:IFa$=""THEN102 104 GOSUB10021:IFa$=CHR$(3)THEN74 106 OPEN1,dn,2,"0:{sh space*3},s,r":INPUT#15,e$:IFe$="62"THENCLOSE1:GOTO114 108 IFe$="21"ORe$="74"THENGOSUB184:CLOSE1:GOTO106 110 IFe$>"64"THENINPUT#1,e$:PRINT"{clear}{down*5}"e$"{space*2}on drive 0" 112 PRINT#15,"i0" 114 OPEN2,dn,2,"#2":PRINT"{clear}":t1=0:t2=0:t3=0:s1=0:s2=0:s3=0:GOTO130 116 GOSUB192:POKE198,0 118 PRINT"{home}{down*21}"TAB(18)"TRACK{space*2}"STR$(VAL(t$))"{sh space}" 120 PRINTTAB(18)"SECTOR "STR$(VAL(s$))"{sh space}{up*2}" 122 PRINTTAB(12)"Input TRACK:{space*2}";:INPUT#9,t$ 123 PRINT:IFVAL(t$)<1THENt$=" 0":GOTO118 124 PRINTTAB(12)"{up}{space*5}":PRINTTAB(12)"Input SECTOR: ";:INPUT#9,s$ 126 PRINT"{up}{space*5}":t$=MID$(STR$(VAL(t$)),2):s$=MID$(STR$(VAL(s$)),2) 128 IFVAL(t$)=0THENs$=" 0":t$=" 0":GOTO116 130 PRINT"{home}{down*20}{space*39}" 132 PRINT"{space*39}" 134 PRINT"{space*39}" 136 PRINT#15,"u1:2,0,"t$","s$:REM ch2 dr0 138 INPUT#15,e1$,e2$,e3$,e4$:IFe1$="00"THEN156 140 GOSUB192:e2$=" DISK ERROR #"+e1$+","+e2$ 142 PRINT"{home}{down*2}":FORi=1TOLEN(e2$):PRINT"{cm p}";:NEXT:PRINT:PRINT"{reverse on}"e2$ 144 FORi=1TOLEN(e2$):PRINT"{cm t}";:NEXT:PRINT 146 PRINT"in TRACK"VAL(e3$)"{left}, SECTOR"VAL(e4$):IFe1$="66"THEN118 148 PRINT"try again? (cr/n or y)" 150 GETa$:IFa$=""THEN150 152 IFa$="y"THEN136 154 PRINT#15,"i0":RUN 156 GOSUB192:PRINT#15,"b-p:2,0":REM ch2 pos1 158 SYStem 160 i=0 162 PRINT:POKE198,0 164 GOTO10 166 IFb>255ORASC(b$)=160THEN174 168 POKEss+i,b: 170 PRINT#15,"b-p:2,"STR$(i):PRINT#2,CHR$(b); 172 i=i+1:GOTO164 174 PRINT"{home}{down*24}{space*9}{reverse on}ARE YOU SURE (n or y){reverse off}"; 176 GETa$:j=-(a$="y")-2*(a$="n")-3*(a$=CHR$(3)):ONjGOTO178,72,74:GOTO176 178 PRINT#15,"m-w"z$CHR$(19)CHR$(2)CHR$(PEEK(ss))CHR$(PEEK(ss+1)) 180 PRINT#15,"u2:2,0,"t$","s$ 182 GOTO130 184 PRINT"{home}{down*16}No disk in drive 0" 186 PRINT"{down}Place disk in drive 0, press any key.":POKE198,0 188 GETa$:IFa$=""THEN188 190 RETURN 192 PRINT"{home}{up}{cm a}{sh asterisk*16}{cm s} {cm a}{sh asterisk*8}{cm s}{cm a}{sh asterisk*9}{cm s}"; 194 PRINT"{sh -}Disk Doctor 64.2{sh -} {sh -}TRACK:"RIGHT$("{space*2}"+t$,2)"{sh -*2}SECTOR:"RIGHT$("{space*2}"+s$,2)"{sh -}"; 196 PRINT"{cm e}{sh asterisk*16}{cm e}{sh asterisk}{cm e}{sh asterisk*8}{cm e*2}{sh asterisk*9}{cm e}"; 198 FORi=1TO8:PRINT"{space*32}";:NEXT 200 PRINT"{cm a}{sh asterisk*39}{cm x}" 202 PRINT"press [@] - Change byte under cursor{space*2}" 204 PRINT"{space*6}[N] - Go to {reverse on}N{reverse off}ext block of file{space*2}" 206 PRINT"{space*6}[J] - {reverse on}J{reverse off}ump to link under cursor " 208 PRINT"{space*6}[Q] - {reverse on}Q{reverse off}uit{space*22}" 210 PRINT"{space*6}[R] - {reverse on}R{reverse off}ewrite current block{space*5}" 212 PRINT"{space*6}[B] - New {reverse on}B{reverse off}lock{space*17}" 214 PRINT"{space*6}[T] - Add {reverse on}T{reverse off}ext string{space*11}" 216 PRINT"{space*2}[+]/[-] - Continuous scan fwd/bkwrd " 217 PRINT"{space*6}[C] - {reverse on}C{reverse off}opy sector to second disk "; 218 FORd=1TO5:PRINT"{space*40}";:NEXT 220 FORd=217TO242:POKEd,PEEK(d)OR128:NEXT:PRINT"{home}"; 222 RETURN 224 cv=1:cm$="Get SYSRES, the ultimate program manipulation system, at ":REM"{141}{clear} 226 cm$=cm$+"your local dealer. It adds over 1100 new":REM"{141}{clear} 228 cm$=cm$+" editing and disk functions. Spend less time correcting your " 230 cm$=cm$+"mistakes and more time programming.{space*3}":REM"{141}{clear} 232 cm$=cm$+"A Commodore 64 without SYSRES is only a Commodore 63.5!" 234 RETURN:{home} 236 cv=2:cm$="**NEW** from SOLIDUS INTERNATIONAL{.*3}{space*24}" 238 cm$=cm$+"SOLIDEX, the personal data filer.{space*6}":REM"{141}{clear} 240 cm$=cm$+"Store notes, records, recipes, etc. on electronic index cards. " 242 cm$=cm$+"{space*3}Hundreds of uses around the home ":REM"{141}{clear} 244 cm$=cm$+"and office. See it at your local dealer." 246 RETURN:{home} 248 cv=2:cm$="Released to public domain by Solidus International Corporati" 250 cm$=cm$+"on.{space*2}Modifications by John Olsen.":RETURN:"{141}{clear} 252 IFcc=0THENGOSUB248 254 IFcc>550THENcc=0:ONcvGOSUB236,224 256 cc=cc+1:IFcc>292THENRETURN:"{141}{clear} 258 PRINT"{home}{down*24}"; 260 cp=INT(cc) 262 IFcp<39THENPRINTSPC(39-cp)LEFT$(cm$,cp)"{home}";:RETURN:"{141}{clear} 264 PRINTLEFT$(LEFT$(MID$(cm$,cp-38),39)+"{space*38}",39)"{home}" 266 RETURN 280 IFPEEK(653)=1THENt$=STR$(VAL(t$)+1):GOTO300 281 s$=STR$(VAL(s$)+1):GOTO300 282 IFPEEK(653)=1THENt$=STR$(VAL(t$)-1):GOTO300 283 s$=STR$(VAL(s$)-1) 300 s=20:t=VAL(t$):sk=VAL(s$) 305 IFsk<0THENt=t-1 306 IFt=0THENt=35 310 IFt>17THENs=18 320 IFt>24THENs=17 330 IFt>30THENs=16 340 IFsk>sTHENsk=0:t=t+1 341 IFt=36THENt=1 345 IFsk<0THENsk=s 350 s$=STR$(sk):t$=STR$(t):GOTO128 360 PRINT"{home}{down*24} Swap disks, then {reverse on}RETURN{reverse off}.{space*2}{reverse on}n{reverse off} to abort."; 365 POKE198,0 370 GETa$:IFa$<>CHR$(13)ANDa$<>"n"THEN370 375 OPEN2,dn,2,"#2":IFa$="n"THEN72 380 GOTO178 10000 "{141}{clear}{ct n}{yellow} 10020 "{delete*7}Program: ""{delete}Disk Doctor PLUS" 10021 GOTO10123:"{delete*20} 10025 "{delete*7} 10030 "{delete*7}Author: Don Lekei 10035 "{delete*7}(modifications by John Olsen) 10036 "{delete*7} 10040 "{delete*7}This program is provided courtesy of: 10045 "{delete*7} 10050 "{delete*7}{space*3}Solidus International Corporation 10060 "{delete*7}{space*4}Suite #5, 144 West 15th Street 10070 "{delete*7}{space*9}North Vancouver, B.C. 10075 "{delete*7}{space*9}Phone: (604)984-0477 10080 "{delete*7} 10090 "{delete*7}To get the MAXIMUM use out of your new 10100 "{delete*7}Commodore-64 computer and your disk 10110 "{delete*7}drive, we recommend using: 10123 z$=CHR$(0):REM"{141}{up}{sh space*24}{up} 10124 OPEN15,dn,15:REM"{141}{up}{sh space*24}{up} 10125 OPEN9,0:REM"{141}{up}{sh space*24}{up} 10126 RETURN:REM"{141}{up}{sh space*24}{up} 10130 "{delete*7}{141}{white}{space*13}*** SYSRES *** 10135 "{delete*7} 10140 "{delete*7}{space*2}""{delete}The Ultimate Program Manipulation 10150 "{delete*7}{space*2}System for Commodore Microcomputers." 10170 "{delete*7}{141}{yellow}Now available at your Commodore dealer.{white} stop tok64 (bastext 1.0)