home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er
/
64ER_CD.iso
/
s85xx
/
s8501.d64
/
fileprotect
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
1995-03-30
|
3KB
|
190 lines
360 GOSUB490
370 GOSUB770
380 GOSUB570
390 IFASC(A$)=140THENSYS64738
400 IFASC(A$)>135ORASC(A$)<133THEN380
410 IFASC(A$)=134THENP=1
420 IFASC(A$)=135THENP=0
430 ONASC(A$)-132GOSUB1470,2080,2080
440 GOTO370
450 END
490 BL$=" "
500 POKE53280,9
510 POKE53281,9
520 PRINTCHR$(5);
530 RETURN
570 A$=""
580 POKE198,0:WAIT198,255
590 GETA$
600 RETURN
640 OPEN15,8,15,"I0"
650 OPEN2,8,2,"#"
660 RETURN
700 X$=""
710 GET#2,X$
720 IFX$=""THENX$=CHR$(0)
730 RETURN
770 PRINTCHR$(147);
780 PRINTSPC(13);"FILEPROTECT 64"
790 PRINTSPC(12);"[197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197]"
800 PRINT
810 PRINTSPC(6);CHR$(18);"SCRATCH-SCHUTZ VON FILES FUER";CHR$(146)
820 PRINTSPC(13);CHR$(18);"C-64 UND 1541";CHR$(146)
830 PRINT
840 PRINTCHR$(144);" (C) 1984 BY JOCHEN FETTE";CHR$(5)
850 PRINT:PRINT:PRINT:PRINT
860 PRINTSPC(10);CHR$(18);" F1 ";CHR$(146);" DIRECTORY"
870 PRINT
880 PRINTSPC(10);CHR$(18);" F3 ";CHR$(146);" PROTECT"
890 PRINT
900 PRINTSPC(10);CHR$(18);" F5 ";CHR$(146);" UNPROTECT"
910 PRINT
920 PRINTSPC(10);CHR$(18);" F8 ";CHR$(146);" END"
930 PRINT
940 PRINT
950 PRINTSPC(10);" IHRE WAHL ?";
960 RETURN
1000 PRINT
1010 PRINT"DISK EINLEGEN UND TASTE DRUECKEN . . ."
1020 GOSUB570
1030 OPEN15,8,15,"I0"
1040 INPUT#15,RM
1050 CLOSE15
1060 IFRM<>0THEN1140
1070 GOSUB640
1080 PRINT#15,"B-R";2;0;18;0
1090 PRINT#15,"B-W";2;0;18;0
1100 INPUT#15,RM
1110 CLOSE15
1120 CLOSE2
1130 PRINT
1140 IFRM<>0ORUE=0THEN1180
1150 PRINT" TYP NAME"
1160 PRINT"[197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197][197]"
1170 UE=0
1180 IFRM=0THEN1250
1190 PRINT
1200 IFRM<>26THENPRINTCHR$(144);"DISK FEHLER !";CHR$(5)
1210 IFUE=0ANDRM=26THENRM=0:GOTO1250:
1220 IFRM=26THENPRINTCHR$(144);"SCHREIBSCHUTZ ENTFERNEN !";CHR$(5):
1230 FORW=1TO1500
1240 NEXTW
1250 RETURN
1290 GOSUB700
1300 FT=0:FT$=""
1310 IFASC(X$)=1THENFT=1:FT$="*SEQ "
1320 IFASC(X$)=2THENFT=2:FT$="*PRG "
1330 IFASC(X$)=3THENFT=3:FT$="*USR "
1340 IFASC(X$)=4THENFT=4:FT$="*REL "
1350 IFASC(X$)=129THENFT=129:FT$=" SEQ "
1360 IFASC(X$)=130THENFT=130:FT$=" PRG "
1370 IFASC(X$)=131THENFT=131:FT$=" USR "
1380 IFASC(X$)=132THENFT=132:FT$=" REL "
1390 IFASC(X$)=193THENFT=193:FT$=" SEQ<"
1400 IFASC(X$)=194THENFT=194:FT$=" PRG<"
1410 IFASC(X$)=195THENFT=195:FT$=" USR<"
1420 IFASC(X$)=196THENFT=196:FT$=" REL<"
1430 RETURN
1470 PRINTCHR$(147)
1480 PRINTSPC(6);CHR$(18);"D I R E C T O R Y";CHR$(146)
1490 PRINT
1500 UE=0
1510 GOSUB1000
1520 IFRM<>0THEN1470
1530 GOSUB640
1540 T=18:S=1
1550 BB=0:FB=664
1560 ZE=0
1570 PRINT#15,"B-R";2;0;T;S
1580 PRINT#15,"B-P";2;0
1590 GOSUB700
1600 T=ASC(X$)
1610 GOSUB700
1620 S=ASC(X$)
1630 FORI=0TO7
1640 PRINT#15,"B-P";2;I*32+2
1650 GOSUB1290
1660 IFFT=0THEN1930
1670 PRINT#15,"B-P";2;I*32+30
1680 GOSUB700
1690 LB=ASC(X$)
1700 GOSUB700
1710 HB=ASC(X$)*256
1720 BB=HB+LB
1730 PRINTSTR$(BB)+LEFT$(BL$,5-LEN(STR$(BB)));
1740 FB=FB-BB
1750 PRINT#15,"B-P";2;I*32+5
1760 N$=""
1770 FORY=0TO15
1780 GOSUB700
1790 IFASC(X$)=160THENY=15:GOTO1810
1800 N$=N$+X$
1810 NEXTY
1820 PRINTN$+LEFT$(BL$,20-LEN(N$));FT$
1830 ZE=ZE+1
1840 IFZE<15THEN1930
1850 ZE=0
1860 PRINT
1870 PRINT"WEITERE EINTRAEGE"
1880 PRINT"BITTE TASTE DRUECKEN . . .";
1890 GOSUB570
1900 PRINTCHR$(147)
1910 PRINTSPC(6);CHR$(18);"D I R E C T O R Y";CHR$(146)
1920 PRINT:PRINT:PRINT:PRINT
1930 NEXTI
1940 IFT<>0THEN1570
1950 CLOSE2
1960 CLOSE15
1970 PRINT
1980 PRINTFB;
1990 IFFB<>1THENPRINT" FREIE BLOECKE"
2000 IFFB=1THENPRINT" FREIER BLOCK"
2010 PRINT
2020 PRINT"TASTE DRUECKEN . . .";
2030 GOSUB570
2040 RETURN
2080 PRINTCHR$(147)
2090 IFP=1THENPRINTSPC(13);CHR$(18);"P R O T E C T";CHR$(146)
2100 IFP=0THENPRINTSPC(12);CHR$(18);"U N P R O T E C T";CHR$(146)
2110 UE=1
2120 GOSUB1000
2130 IFRM<>0THEN2080
2140 GOSUB640
2150 T=18:S=1
2160 PRINT#15,"U1 2 0 18",S
2170 GOSUB700
2180 T=ASC(X$)
2190 GOSUB700
2200 SA=S
2210 S=ASC(X$)
2220 FORI=2TO226STEP32
2230 PRINT#15,"B-P";2;I
2240 GOSUB1290
2250 IFFT>128ANDFT<133ANDP=1THENGOSUB2330
2260 IFFT>192ANDFT<197ANDP=0THENGOSUB2330
2270 NEXTI
2280 IFRM=1THENRM=0:PRINT#15,"U2 2 0 18";SA
2290 IFT<>0THEN2160
2300 CLOSE2
2310 CLOSE15
2320 RETURN
2330 GOSUB700:GOSUB700
2340 N$=""
2350 FORY=0TO15
2360 GOSUB700
2370 IFASC(X$)=0THENN$=N$+" "
2380 IFASC(X$)<>0THENN$=N$+X$
2390 NEXTY
2400 IFP=1THENPRINTFT$+" "+N$+" PROTECT (J/N)";
2410 IFP=0THENPRINTFT$+" "+N$+" UNPROTECT (J/N)";
2420 GOSUB570
2430 IFA$="N"THENPRINT"N":GOTO2510
2440 IFA$<>"J"THEN2420
2450 PRINT"J"
2460 PRINT#15,"B-P";2;I
2470 IFP=1THENFT=(FTOR64)
2480 IFP=0THENFT=(FTAND255-64)
2490 PRINT#2,CHR$(FT);
2500 RM=1
2510 RETURN