Documentation For FBAD This is the documentation for the program written by SME Systems to look for BAD SECTORS on disk drives. STARTING UP ----------- You start the program with the command 'FBAD'. There are no command line options or parameters. USING ----- When the program is run, the screen is cleared and a message is displayed on the screen. You are now asked for the 'DISK DRIVE' name that you want to check for bad sectors on. If you enter a only, the program will immediately terminate and return you to the operating system. Disk drive names can be upper or lower case and are only a SINGLE LETTER in the range A..P. After selecting a disk drive, the program LOGS IT IN then displays the parameters for the disk. These are number of tracks, sectors per track etc. This should be checked against what you think the drive is. These parameters are used by the program to check the disk and if they are not correct, the program will not function correctly. NEXT you are asked for a starting block number to check. If you enter a the first block on the disk is checked. This is the default. The LAST BLOCK you want to check is then asked for. If you enter a then the last block on the disk is assumed. When the block numbers are entered, the program then quickly scans all the sectors on the disk and traps any bad sectors. These are recorded into the program and saved for later action. When the disk has been checked, the program will offer to display the bad sector numbers. The last step in the process is where the program asks youif you want to MARK the bad sectors in the directory. If you answer 'Y' then the program will; 1) Erase any copies of existing marker files ('BAD'). 2) Scan the directory and create a new 'BAD' file name. 3) Allocate all the bad sectors (in blocks) to the file. 4) Reset the disk system. The above actions result in the 'BAD' file being created on the disk you are checking and having pointers in it to the bad sectors. In this way the file takes up storage space that is bad so that other files will not attempt to use this space. DEPENDANCIES ------------ This program has the following dependancies. 1) Only runs with CP/M Plus (3). 2) Will not MARK directories on disks with less capacity than 256 K. 3) Will not mark disks with bad sectors in the directory. SOURCE CODE ----------- FBAD is written in PL/I-80 and uses a large number of assembler routines. The following is a list of the files used. FBAD .COM The executable program. FBAD .PLI Source code to the main part of the program PLIUTIL .REL Library of assembly routines used by FBAD PLIUTIL .DCL PL/I declarations for the assembler library. The PLIUTIL.REL file is made up of the following modules. PLIUTIL .ASM Main section RANDOM .ASM Random number routine. PBUFF .ASM Print a buffer of 128 bytes routine. PORT .ASM Direct port I/O DATE .ASM Time and Date routine. PLICOMM .ASM Common routines in the library. PUSER .ASM User number fetch and support. CRC .ASM CRC routines. SHIFT .ASM Bit string shift routines. DELFIL .ASM File deletion routines. MAKLIB .SUB Submit file to stitch a library back together from REL files. -------------------------------- To generate a new version; 1) Do your mods and re-assemble/compile. 2) Link a new executable version with the command link x:fbad,x:pliutil where x is the drive the files are on. SME Systems 14-12-84