8-Bit Software Online Conversion

Disc Format Identifier - Listing

10REM ADFS/DFS identification 20REM Works on all machines with DFS 30REM (C) 1996 Jon Ripley 40REM This program is PD 50REM Please DO NOT ALTER this progra m 60REM FNdisctype(drive%) returns a st ring containing either ADFS, DFS or ERRO R 70REM drive% is the drive number you wish to test 80REM You may include this function i n your programs but you should credit me in the REMs for writing it. 90DEFFNS="AorDfs" 100MODE 7 110DEFPROCcentre(A$,Y):PRINTTAB((40-LE NA$)/2,Y)A$;:ENDPROC 120FORY=1TO2:PROCcentre(CHR$141+CHR$(1 28+Y)+"ADFS/DFS Disc Identification ",Y ):PROCcentre(CHR$141+CHR$(127+2*Y)+"(C) Jon Ripley 1996 ",22+Y):NEXT 130VDU28,0,21,39,4 140PRINT''"This program can be used to identify"'"whether a disc is ADFS or DF S."''"The program checks to see is a dis c is DFS formatted, if not it will pres ume that the disc is ADFS format."''"T his program will work on all computers" 150PRINT"with DFS."''"Press any key to continue...";:IFGET 160REPEAT 170CLS 180PRINT"Insert a disc into drive 0 an d press a key..."; 190IFGET 200A$=FNdisctype(0) 210IF A$="ERROR" PRINT''"I cannot iden tify this disc." ELSE PRINT''"This is a" ;STRING$(-(A$="ADFS"),"n")" ";A$" disc." 220PRINT'"Press any key to check anoth er disc or E to end..."; 230A$=GET$ 240UNTIL INSTR("Ee",A$) 250MODE 7 260END 270DEFFNdisctype(drive%) 280LOCAL B%:B%=&100 290?B%=drive%:B%!1=&E000 300B%!5=&5303:B%?9=33 310X%=0:Y%=1:A%=&7F 320CALL&FFF1 330IF B%?10=0 ="DFS" 340IF B%?10=&18 ="ADFS" 350="ERROR"