start tok64 d64-SNhe7W 10 PRINT"{clear}{down*2}{space*4}{cm a}{sh asterisk*30}{cm s}" 15 PRINT"{space*4}{sh -}{space*9}file protect{space*9}{sh -}" 16 PRINT"{space*4}{sh -}{space*9}{cm u*12}{space*9}{sh -}" 20 PRINT"{space*4}{sh -} a program that will lock or{space*2}{sh -}" 25 PRINT"{space*4}{sh -} unlock a file or an entire{space*3}{sh -}" 30 PRINT"{space*4}{sh -}{space*9}disk of files.{space*7}{sh -}" 35 PRINT"{space*4}{sh -}{space*2}written by finley goodwyn{space*3}{sh -}" 36 PRINT"{space*4}{sh -}{space*8}(june - 1986){space*9}{sh -}" 40 PRINT"{space*4}{cm z}{sh asterisk*30}{cm x}" 45 PRINT"{down*2}{space*5}{reverse on}1{reverse off} file lock{space*7}{reverse on}2{reverse off} file unlock" 50 PRINT"{down}{space*5}{reverse on}3{reverse off} disk lock{space*7}{reverse on}4{reverse off} disk unlock" 55 PRINT"{down}{space*5}{reverse on}5{reverse off} directory{space*7}{reverse on}6{reverse off} quit" 60 PRINT"{down}{space*13}{reverse on}7{reverse off} instructions" 65 INPUT"{down*2}{space*3}{reverse on}type a number and press return";n 70 ON n GOTO 1100,2100,100,200,5000,400,3000 100 REM *** disk lock ** 102 PRINT"{clear}{down*2}are you sure you want to lock a disk?{space*5}(y/n)" 103 GETa$:IFa$<>"y"ANDa$<>"n"THEN103 104 IFa$="n"THEN10 105 IFa$="y"THENPRINT"{clear}{down*2}{reverse on}{space*3}put disk to be locked into drive{space*4}"; 106 PRINT"{reverse on}{space*10}and press return{space*15}" 107 GETa$:IFa$<>CHR$(13)THEN107 110 OPEN15,8,15:PRINT#15,"i0":OPEN2,8,2,"#" 120 PRINT#15,"u1:";2;0;18;0:GOSUB170 130 PRINT#15,"b-p:";2;2:PRINT#2,CHR$(80);:GOSUB170 140 PRINT#15,"b-p:";2;166:PRINT#2,CHR$(80);:GOSUB170 150 PRINT#15,"u2:";2;0;18;0:GOSUB170 160 CLOSE2:PRINT#15,"i0":CLOSE15:GOTO10 170 INPUT#15,en,em$,et,es 180 IFenTHENPRINTen,em$,et,es:STOP 190 RETURN 200 REM *** disk unlock *** 201 PRINT"{clear}{down*2}are you sure you want to unlock a disk?{space*5}(y/n)" 202 GETa$:IFa$<>"y"ANDa$<>"n"THEN202 203 IFa$="n"THEN10 204 IFa$="y"THENPRINT"{clear}{down*2}{reverse on}{space*3}put disk to be unlocked into drive{space*3}"; 205 PRINT"{reverse on}{space*10}and press return{space*14}" 206 GETa$:IFa$<>CHR$(13)THEN206 210 OPEN15,8,15:PRINT#15,"i0":OPEN2,8,2,"#" 220 PRINT#15,"u1:";2;0;18;0:GOSUB290 230 PRINT#15,"b-p:";2;2:PRINT#2,CHR$(65);:GOSUB290 240 PRINT#15,"b-p:";2;166:PRINT#2,CHR$(65);:GOSUB290 250 PRINT#15,"m-w";CHR$(1);CHR$(1);CHR$(1);CHR$(65) 260 PRINT#15,"m-w";CHR$(2);CHR$(7);CHR$(1);CHR$(65) 270 PRINT#15,"u2:";2;0;18;0:GOSUB290 280 CLOSE2:PRINT#15,"i0":CLOSE15:GOTO10 290 INPUT#15,en,em$,et,es 300 IFenTHENPRINTen,em$,et,es:STOP 310 RETURN 400 REM *** quit routine *** 410 PRINT"{clear}{down*4}{space*4}are you sure you want to quit?{space*23}(y/n)" 420 GET a$:IFa$<>"y"ANDa$<>"n"THEN420 430 IF a$="n"THEN10 440 IF a$="y"THENPRINT"{down*3}{space*2}{yellow}o.k. if you say so. so long for now." 450 PRINT"{down*2}":END 600 PRINT"{down*2}press return to go to menu" 610 GETa$:IFa$<>CHR$(13)THEN610 620 GOTO10 1100 REM *** file lock *** 1102 PRINT"{clear}{down*2}{space*2}are you sure you want to lock a file?{space*9}(y/n)" 1103 GETa$:IFa$<>"y"ANDa$<>"n"THEN1103 1104 IFa$="n"THEN10 1105 OPEN15,8,15,"i0":OPEN2,8,2,"#":p$="lock": 1110 t=18:s=0:nl$=CHR$(0):GOSUB1230 1120 IFsn=255THENCLOSE2:CLOSE15:GOTO10 1130 t=tn:s=sn:GOSUB1230 1140 FORj=0TO7:r(j)=0:NEXT:PRINT"{clear}type number of file"; 1150 PRINT" you wish to {reverse on}"p$;"{reverse off}" 1155 PRINT 1160 FORj=0TO7:ft(j)=j*32+2:PRINT#15,"b-p";2;ft(j):GET#2,ps$:ps(j)=ASC(ps$+nl$) 1170 IFps(j)<>0THENr(j)=1:GOSUB1250:d=j:GOSUB1360:IFfl=1THENj=7 1180 NEXTj:GOSUB1370 1190 GETb$:IFb$=""THEN1190 1200 b=VAL(b$):IFb=teTHEN1120 1210 IFr(b)=0THEN1190 1220 GOSUB1300:GOTO1190 1230 PRINT#15,"u1";2;0;t;s:GOSUB1380 1240 GET#2,tn$,sn$:tn=ASC(tn$+nl$):sn=ASC(sn$+nl$):RETURN 1250 GET#2,j$:GET#2,j$:c=0:f$(j)="" 1260 GET#2,a$:a=ASC(a$+nl$) 1270 IFa<>160ANDa<>0THENf$(j)=f$(j)+a$:c=c+1:IFc<16THEN1260 1280 te=j+1:IFa=0THENfl=1 1290 RETURN 1300 PRINT#15,"b-p";2;ft(b) 1310 IFp$="lock"THENps(b)=ps(b)OR64:PRINT#2,CHR$(ps(b));:GOSUB1380:GOTO1330 1320 ps(b)=ps(b)AND191:PRINT#2,CHR$(ps(b));:GOSUB1380 1330 PRINT#15,"u2";2;0;t;s:GOSUB1380 1340 PRINT"{home}{down}":FORk=0TO7:IFr(k)=1THENd=k:GOSUB1360 1350 NEXTk:GOSUB1370:RETURN 1360 x=(ps(d)AND64)-4:x=x-(x<0)*36:PRINTdCHR$(x);f$(d):RETURN 1370 PRINTte" {reverse on}next{reverse off}":RETURN 1380 INPUT#15,en,em$,et,es 1390 IFenTHENPRINTen,em$,et,es:STOP 1400 RETURN 2100 PRINT"{clear}{down*2}are you sure you want to unlock a file?{space*12}(y/n)" 2102 GETa$:IFa$<>"y"ANDa$<>"n"THEN2102 2104 IF a$="n" THEN10 2105 OPEN15,8,15,"i0":OPEN2,8,2,"#":p$="unlock" 2110 t=18:s=0:nl$=CHR$(0):GOSUB2230 2120 IFsn=255THENCLOSE2:CLOSE15:GOTO10 2130 t=tn:s=sn:GOSUB2230 2140 FORj=0TO7:r(j)=0:NEXT:PRINT"{clear}type number of file"; 2150 PRINT" you wish to {reverse on}";p$;"{reverse off}" 2155 PRINT 2160 FORj=0TO7:ft(j)=j*32+2:PRINT#15,"b-p";2;ft(j):GET#2,ps$:ps(j)=ASC(ps$+nl$) 2170 IFps(j)<>0THENr(j)=1:GOSUB2250:d=j:GOSUB2360:IFfl=1THENj=7 2180 NEXTj:GOSUB2370 2190 GETb$:IFb$=""THEN2190 2200 b=VAL(b$):IFb=teTHEN2120 2210 IFr(b)=0THEN2190 2220 GOSUB2300:GOTO2190 2230 PRINT#15,"u1";2;0;t;s:GOSUB2380 2240 GET#2,tn$,sn$:tn=ASC(tn$+nl$):sn=ASC(sn$+nl$):RETURN 2250 GET#2,j$:GET#2,j$:c=0:f$(j)="" 2260 GET#2,a$:a=ASC(a$+nl$) 2270 IFa<>160ANDa<>0THENf$(j)=f$(j)+a$:c=c+1:IFc<16THEN2260 2280 te=j+1:IFa=0THENfl=1 2290 RETURN 2300 PRINT#15,"b-p";2;ft(b) 2310 IFp$="lock"THENps(b)=ps(b)OR64:PRINT#2,CHR$(ps(b));:GOSUB2380:GOTO2330 2320 ps(b)=ps(b)AND191:PRINT#2,CHR$(ps(b));:GOSUB2380 2330 PRINT#15,"u2";2;0;t;s:GOSUB2380 2340 PRINT"{home}{down}":FORk=0TO7:IFr(k)=1THENd=k:GOSUB2360 2350 NEXTk:GOSUB2370:RETURN 2360 x=(ps(d)AND64)-4:x=x-(x<0)*36:PRINTdCHR$(x);f$(d):RETURN 2370 PRINTte" {reverse on}next{reverse off}":RETURN 2380 INPUT#15,en,em$,et,es 2390 IFenTHENPRINTen,em$,et,es:STOP 2400 RETURN 3000 PRINTCHR$(14) 3010 PRINT"{clear}{down}{space*9}********************" 3020 PRINT"{space*9}*{space*3}FILE{sh space}PROTECT{space*3}*" 3030 PRINT"{space*9}*{space*3}{cm u*12}{space*3}*" 3040 PRINT"{space*9}*{space*2}Finley Goodwyn{space*2}*" 3050 PRINT"{space*9}*{space*3}Instructions{space*3}*" 3060 PRINT"{space*9}********************" 3070 PRINT"{down}File Print was made from 5 different programs to help{space*2}you protect"; 3080 PRINT" your programsagainst accidental 'scratch'." 3090 PRINT"{down}Once a file or{space*2}disk{space*2}has been 'locked',the scratch{space*2}command"; 3100 PRINT"{space*2}will{space*2}be disabled.You can load locked programs,read locked"; 3110 PRINT"files,{space*2}rename or{space*2}copy them.{space*2}You{space*2}justcan't scratch them." 3115 GOSUB4000 3120 PRINT"{clear}{reverse on}1. File Lock{reverse off}" 3130 PRINT"Select option #1 on the{space*2}Menu.{space*2}It listsprograms and files on"; 3140 PRINT" your disk. Up to 8at a time can{space*2}be{space*2}viewed on the screen."; 3145 PRINT"Press the number of the file"; 3150 PRINT" you want tolock{space*2}and{space*2}a{space*2}'less than'{space*2}sign (<) willappear by"; 3160 PRINT" the name to show it is locked.This{space*2}same sign{space*2}will be to"; 3170 PRINT" the right ofthe file type on the directory." 3175 PRINT 3180 PRINT"{down}{reverse on}2. File Unlock{reverse off}" 3190 PRINT"Option 2 lets you 'unlock'a file so thatit can be scratched."; 3200 PRINT"{space*2}The files and pro-grams will be listed to the screen."; 3210 PRINT"Pressthe{space*2}number{space*2}of the{space*2}locked file and the(<) will"; 3220 PRINT" disappear as if by{space*2}magic.{space*2}Thefile is now 'unlocked'." 3225 GOSUB 4000 3230 PRINT"{clear}{reverse on}Disk Lock{reverse off}" 3240 PRINT"Option 3 locks a disk so none of the pro-grams can be"; 3250 PRINT" scratched. Your disk drivewill return an{space*2}error message"; 3260 PRINT" because wefool it into thinking the disk{space*2}has beenformatted"; 3270 PRINT"{space*2}on{space*2}other{space*2}than{space*2}a{space*2}1541 diskdrive. A locked disk will show 2P"; 3280 PRINT" in theheader rather{space*2}than the{space*2}normal 2A. Thisfools the"; 3290 PRINT" computer." 3300 PRINT"{down}{reverse on}4. Disk Unlock{reverse off}" 3310 PRINT"Press 4 to change the{space*2}disk{space*2}header backfrom 2P to a 2A format so"; 3320 PRINT" the 1541 drivewill recognize it as one of its own for-matted"; 3330 PRINT" disks. All you do is put the diskto be 'unlocked'{space*2}in{space*2}the drive"; 3340 PRINT" and makethe #4 selection." 3350 PRINT"{down}All{space*2}selections{space*2}must{space*2}be{space*2}confirmed{space*2}bypressing 'Y' for yes."; 3360 PRINT"{space*2}You can{space*2}also seethe entire directory by pressing #5." 3370 GOSUB 4000 3380 PRINTCHR$(142):GOTO10 4000 PRINT"{down}{space*7}{reverse on}PRESS{sh space}RETURN{sh space}TO{sh space}CONTINUE" 4010 GETa$:IFa$<>CHR$(13)THEN4010 4020 RETURN 5000 PRINT"{clear}{down}{space*7}view directory" 5001 PRINT"{space*7}{cm u*14}" 5002 PRINT"{down*2}{space*3}you may pause it with the" 5003 PRINT"{down}{space*4}space bar." 5005 PRINT"{down*2}{space*3}press any key to continue" 5010 OPEN15,8,15 5012 GOSUB 5304:GOTO 5014 5014 PRINT"{clear}" 5016 OPEN 1,8,0,"$0":GOSUB 5028 5018 SYS 49386:GOSUB 5028 5020 CLOSE 1:CLOSE15 5022 PRINT"{reverse on}{down}press any key to continue" 5024 GET k$:IF k$=""THEN5024 5026 GOTO 5262 5028 INPUT#15,a$,b$:IF VAL(a$)<>0 THEN 5032:nt"{clear}"a$","b$:GOSUB5184:GOTO5262 5030 RETURN 5032 PRINT"{clear}"a$","b$:CLOSE 1:GOSUB 5184:GOTO 5262 5184 RETURN 5262 PRINT"{clear}{down*2}{space*4}type 'run' and press return":END 5304 FOR t=0 TO 45:READ d:q=q+d:POKE 49280+t,d:NEXT:IF q<>7499 THEN 5344 5306 DATA 169,0,133,251,169,48,133,252,162,1,32,198,255,160,0,32,207,255 5308 DATA 166,144,208,18,145,251,200,208 5310 DATA 244,230,252,165,252,201,160,208,234,169 5312 DATA 1,141,255,207,145,251,32,204,255,96 5314 FOR t=0 TO 48:READ d:POKE 49328+t,d:r=r+d:NEXT:IF r<>8035 THEN 5344 5316 DATA 169,0,133,253,169,48,133,254,160,0,162,1,32,201,255,177,253,32 5318 DATA 210,255,166,144,208,21,204,255 5320 DATA 207,240,10,200,192,0,208,237,230,254,76,191,192,165,252,197,254 5322 DATA 208,240,32,204,255,96 5324 FOR t=0 TO 87:READ d:POKE t+49386,d:k=k+d:NEXT:IF k<>13101 THEN 5344 5326 DATA 162,1,32,198,255,32,207,255,32 5328 DATA 207,255,32,207,255,165,144,208,66,32,207,255,240,61,32,204,255 5330 DATA 32,228,255,201,32,208,5,32,228 5332 DATA 255,240,251,162,1,32,198,255,32,207,255,141,0,206,32,207,255,168 5334 DATA 174,0,206,152,32,205,189,169 5336 DATA 32,32,210,255,32,207,255,240,6 5338 DATA 32,210,255,76,43,193,169,13,32 5340 DATA 210,255,76,245,192,32,204,255,96 5342 RETURN 5344 PRINT"{clear}error in statements" stop tok64 (bastext 1.0)