Comments on logic and coding of program:
The structure root is used to read 32 bytes of File Entry in Root Directory and Structure one_root_sector reads all 16 File entries in one Sector of Root Directory.
If you want to read all the sectors of root directory information you should take it as struct root entry[224]; however I have written the program to analyze the 16 entries of only one sector of root directory.
The Starting Sector of the File has been calculated as follows:
j= one.entry[i].starting_cluster+31;
It is done so because the data area of the 1.44 MB, 3 ½ inch floppy disk starts after the first 32 sectors of the floppy disk. And in the specified capacity floppy disk, one cluster is of one sector.
The following table shows the logical map of 1.44MB, 3½ inch floppy disk:
Logical Map of 3½ Inches, 1.44 MB floppy disk, Formatted with the FAT12 File System and having 18 Sectors Per Track, 80 Tracks, 2 Sides and 512 bytes per Sector (using 1 Sector per Cluster). |
Absolute Sectors |
Contents |
0 |
Boot Record |
1 – 9 |
FAT 1 |
10 – 18 |
FAT 2 |
19 – 32 |
Root Directory |
33 – 2879 |
Data Area |
The out put of the program is displayed as follows:
FILE NO. |
FILENAME |
EXTENSION |
STARTING CLUSTER |
FILESIZE |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 |
ALLPARTS
CUTPASTE
FLOPYDBR
HDD_DBR
REC_DBR
MBR_BACK
PASTEMBR
PARTBOOT
TTPARBOO
TT_IMAGE
TEMPFLP
TEMPWIPE
NOW_RAW
DATAWIPE
LOW_WIPE |
C
C
C
C
C
C
C
C
C
C
C
C
C
C
C |
19
41
42
45
53
59
62
65
71
78
86
96
103
114
118 |
11131
442
1413
4094
2785
1172
1181
2685
3220
3826
4992
3234
5416
2029
3385 |
Enter The File Number, you Want to Delete and Wipe out Completely 8
You are About to wipe-out, The File "PARTBOOT.C"
Do you Want to Continue...(Y/N) Y
File "PARTBOOT.C" Deleted !!!
|
|