10 ' DISK DRIVE TEST 20 ' BASED ON A PROGRAM BY JOE McDERMOTT WHICH WAS COPIED 30 ' FROM THE APRIL, 1983 ISSUE OF SVCS NEWSLETTER. 40 ' MODIFIED BY JIM SERWER, PO BOX 555, CUPERTINO, CA. 95015 50 ' MODIFIED AGAIN ON 5-20-83 BY JACK MITCHELL, SARATOGA, CA. 95070. 60 ' THIS PROGRAM CREATES A SERIES OF SEQUENTIAL FILES. 70 ' IT WRITES DATA TO THESE AND READS IT BACK FOR VERIFICATION. 80 ' VERIFICATION MEANS DISPLAYING THE FIRST 240 CHARACTERS - ALL ASTERISKS (*) 90 ' FINALLY THE TEST FILES ARE ERASED. 100 ' THE FILENAMES ARE OF THE FORM "JACKSTST.nnn" WHERE "nnn" IS A SEQUENTIAL NUMBER 110 CLS 120 NUMFILES = 105 ' MAX. NUMBER OF FILES THAT CAN BE CREATED. 130 DIM FS$(NUMFILES) ' ARRAY FOR STORING FILESPECS 140 LOCATE 2,25 150 INPUT "DRIVE TO BE TESTED (A-D) "; DD$ 160 IF RIGHT$(DD$,1) <> ":" THEN DD$=DD$ + ":" 170 LOCATE 4,1: PRINT "START TIME": LOCATE 4,71: PRINT "STOP TIME" 180 LOCATE 4,19: INPUT "*** INSERT DISKETTE AND PRESS ENTER ***"; Z$ 190 LOCATE 6,1: PRINT TIME$ 200 FOR I = 1 TO NUMFILES ' -------- CREATE FILES -------- 210 H=I: N$=STR$(H) 220 V$=MID$(N$,2,3) 230 DNAME$="JACKSTST" ' FILE NAME, 8 CHARACTER MAX. 240 FTYPE$="."+V$ ' FILE EXTENSION USED IN THE TEST. 250 FS$(I) = DD$+DNAME$+FTYPE$ 260 LOCATE 6,28: PRINT "CREATING: "; FS$(I) 270 OPEN "O", 1, FS$(I) ' CREATE DIRECTORY ENTRY 280 FOR J = 1 TO 12 290 PRINT #1, STRING$(250,"*"): ON ERROR GOTO 600 300 NEXT J 310 NUM= NUMFILES ' NUMBER OF FILES READ & ERASED WHEN THERE IS NO DISK FULL ERROR. 320 CLOSE 1 330 NEXT I 340 LOCATE 6,71: PRINT TIME$: LOCATE 8,1: PRINT TIME$ 350 FOR K = 1 TO (NUM/2+1) ' -------- READ BACK FILES -------- 360 I = K 370 GOSUB 490 380 I = NUM - K + 1 390 GOSUB 490 400 CLOSE 1 410 NEXT K 420 LOCATE 8,71: PRINT TIME$: LOCATE 10,1: PRINT TIME$ 430 FOR I = 1 TO NUM ' -------- ERASE FILES -------- 440 LOCATE 10,28: PRINT "ERASEING: "; FS$(I) 450 KILL FS$(I) 460 NEXT I 470 LOCATE 10,71: PRINT TIME$: BEEP: BEEP: BEEP: BEEP 480 LOCATE 12,22: PRINT "The Test is Over...Have a Nice Day!": END 490 LOCATE 8,49: PRINT STRING$(3,32) 500 LOCATE 8,29: PRINT "READING: "; FS$(I) '------- SUBROUTINE FOR READ ------- 510 OPEN "I", 1, FS$(I) 515 IF EOF(1) GOTO 580 520 INPUT #1, L$: LOCATE 9,1: PRINT LEFT$(L$,80) 'PRINTING WHAT WAS WRITEN. 530 INPUT #1, L$: LOCATE 10,1: PRINT LEFT$(L$,80) 'PRINTING WHAT WAS WRITEN. 540 INPUT #1, L$: LOCATE 11,1: PRINT LEFT$(L$,80) 'PRINTING WHAT WAS WRITEN. 550 LOCATE 9,1:PRINT STRING$(80,32) 'BLANKING WHAT WAS PRINTED ON THE SCREEN. 560 LOCATE 10,1:PRINT STRING$(80,32) 'BLANKING WHAT WAS PRINTED ON THE SCREEN. 570 LOCATE 11,1:PRINT STRING$(80,32) 'BLANKING WHAT WAS PRINTED ON THE SCREEN. 580 CLOSE 1 590 RETURN 600 LOCATE 7,30: IF ERR = 61 THEN PRINT "* * *DISK FULL* * *" ELSE PRINT ERR: STOP 610 NUM= VAL(V$): GOTO 340 'ON ERROR (NUM=VAL(V$))=MAX NUMBER OF FILES READ & ERRASED.