|
Parameter |
What it means |
dinfo.drive = 0x00 |
It indicates the drive 0 that is floppy disk drive (a:) |
dinfo.head = head |
It points to head number 0 and 1 as floppy has two sides(two heads) |
dinfo.track = track |
It points to track 0 to 79 as there are 80 tracks on each side of floppy. |
dinfo.sector = sector |
It points to sector 1 to 18 as there are 18 sectors in each track. |
dinfo.sector = 1 |
Number of sectors to consider for write operation = 1 |
dinfo.buffer = dbuf |
Data buffer for the operation |
- _bios_disk(_DISK_WRITE, &dinfo) writes the data on the sectors of the physical surface of floppy disk, specified by dinfo.
- The status returned is stored in result that is used to display the message for successful operation or to display an error message on the screen if any error occurs.
If after the Method – 2 your new floppy does not work, you may further apply Method – 1 on your new floppy, which you used as destination disk during the Method – 2.
Not only this but also the number of hits and trials may vary depending upon the corruption of the disk. But you need not to worry if even after you are not getting the satisfactory results.
You can try file by file recovery or can try many more tips which you will learn in the next. Here we shall implement the idea of collecting the file information from Root Directories, in our programming to recover the data. |
Thinking for Logical Recovery for Deleted or lost Data:
All the previous cases we discussed in this chapter for recovery, were to recover the data in such cases where we were expecting that only the DBR is corrupted and the sectors in track 0, having FAT1, FAT2 and Root directories are readable.
But if the problem is due to the corruption of FAT or the data has been deleted from the disk or you want to recover the data directly by reading its information from the Root directory, we need to read the information such as, Filename, starting cluster, size of the file, Attribute etc. from its Root directory entry.
As we have already discussed about Root Directory in earlier chapters that there is the information of 32 Bytes for each file or directory. These 32 Bytes are divided as follows:
Number of Bytes |
Information Description |
8 Bytes |
Filename |
3 Bytes |
Extension |
1 Byte |
Attribute |
10 Bytes |
Reserved |
2 Bytes |
Time, Created or Last Updated |
2 Bytes |
Date, Created or Last Updated |
2 Bytes |
Starting Cluster |
4 Bytes |
File Size |
|
|