boot sector, rde and fat analysis and study. floppy construction 1.write - protect notch. 2.hub....
TRANSCRIPT
BOOT SECTOR, RDE AND FAT ANALYSIS AND STUDY
FLOPPY CONSTRUCTION
1.Write - Protect Notch.2.Hub.3.Shutter.4.Outer Jacket.5.Protective Woolen Film.6.Magnetic Disk.7.Sectors.
DATA DISTRIBUTION (PHYSICAL)
TRACKS
SECTORS
2 sides/disk80 tracks/side18 sectors/track512 bytes/sector
Total = 1474560 bytes = 1440 Kbytes = Approx. 1.44 MB
Note: While Calculating disk space 1 KB = 1000 bytes
DATA DISTRIBUTION (LOGICAL)
SYSTEM AREA DATA AREA / FILE AREA
1.44MB FLOPPY SPACE
BOOT SECTOR
1 2
FATROOT
DIRECTORY ENTRY
1 9 9 14 SECTORS
BOOT SECTOR = 1 SECTORFAT = (9+9) 18 SECTORSRDE = 14 SECTORS
TOTAL = 33 SECTORSi.e. 0 10 32.
TWO FAT RECORDS AND IDENTICAL TO EACH OTHER.1 SECTOR = 1 CLUSTER.
OUR AIM
1. TO DISPLAY THE BOOT SECTOR OF THE FLOPPY DISK.
2. TO DISPLAY THE ROOT DIRECTORY ENTRY.
3. THE DISPLAY THE FAT INFORMATION AND FILE CONTENTS OF A SPECIFIC FILE.
AIM 1 : BOOT SECTOR.
BOOT SECTORIt gives physical characteristics of the disk.As the name suggests boot sector is of 1
sector i.e. 1 cluster.The 2-byte numbers are stored little endian
(low order byte first).
Distribution of BOOT SECTOR.Offset in Boot
Sector(HEX) Length in
BytesMnemonic Standard Value
00 3 Jump to bootstrap either EB XX 90 (90 is NOP)or E9 XX XX
03 8 OEM_Identifier "IBM 3.3", "IBM 20.0", "MSDOS5.0", "MSWIN4.0".
0B 2 Bytes Per Sector 0200H
0D 1 Sectors Per Cluster 0001H
0E 2 Reserved Sectors 0000H
10 1 Number Of FATs 0002H
11 2 No. of Root Directory Entries 224H
13 2 Number Of Sectors 2880H
15 1 Media Descriptor Table F0H 1.44MB , F9 1.2 MB
16 2 Sectors Per FAT 09
18 2 Sectors Per Track 18
1A 2 No. of Heads 2
1C 4 Hidden Sectors 0
20 4 Big Number Of Sectors 0
24 1 Physical Drive Number 00
25 1 Reserved 00
26 1 Extended Boot Signature Record 29H
27 4 32-bit Binary Volume ID XX XX
2B 11 Volume Label Volume Name
36 8 Reserved 00
3E 1C2 Bootstrap ( Signature ) Must END WITH 55 AA .
Ending bit of the boot sector are “55 AA”
THE CODING PART
The interrupt used is 25H : absolute disk read interrupt.Input :AL 00H for drive A:CX X1h = no. of sectors.DX X2h = starting sector no.DS:BX offset of buffer.
Values of X1 and X2CX(X1) DX(X2)
BOOT 1H 0H
RDE 0EH 13H
FAT 09H 01H
Example :MOV AL,00HMOV CX,01HMOV DX,00HMOV BX,OFFSET BUFFINT 25H
This will point to the starting address of the boot sector.
Root Directory Entry Immediately after these FAT sectors, the root directory
sectors start. In a FAT file system, root directories comprise 14
sectors. You know that the maximum directory entry allowed
under the root directory for the FAT file system on a 3.5" floppy disk is 224.
The size for root directory entries is (14 * 512) bytes, which is equivalent to 7168 bytes.
Divide 7168 bytes with the max root entries for the FAT; you will get each entry size for the root directory, which is 32 bytes.
Each 32 bytes holds information about a file or directory.
ROOT DIRECTORY ENTRYByte Range Description Size
00H Short name for file 8
08H ext 3
0BHFile attribute (Read only, directory, System
file, and so on)1
0CH Reserved A
16H Time 2
18H Date 2
1AH 16-bit cluster number 2
1CH File size in bytes 4
Notes on the first byte of the FAT directory entry:1. If the first byte is equal to 0x00, this entry is available and no entry beyond this one has been used.2. If the first byte is equal to 0xE5, this entry has been erased and is available for use.3. If the first byte is equal to 0x05, the actual filename character for this byte is 0xE5.
The Date and Time FormatNotes on the Date/Time format of the FAT directory
entry: Date Format: The date field is 16-bit. This is relative
to 01/01/1980. Bits 0 - 4: Day of month, range 1-31 Bits 5 - 8: Month of year, range 1-12 Bits 9 - 15: Count of years, range 0 – 127
Time format: This is also 16-bit and its granularity is 2 seconds. Bits 0 - 4: 2-second count, valid value range 0-29
inclusive (0 - 58 seconds) Bits 5 - 10: Minutes, range 0-59 Bits 11 - 15: Hours, range 0-23
FAT (File Allocation Table) The traditional DOS file system types are
FAT12 and FAT16. Here FAT stands for File Allocation Table: the
disk is divided into clusters, the unit used by the file allocation, and the FAT describes which clusters are used by which files.
The FAT12/16 type is important, not only because of the traditional use, but also because it is useful for data exchange between different operating systems, and because it is the file system type used by all kinds of devices, like digital cameras.
The first cluster of the data area is cluster #2. That leaves the first two entries of the FAT unused.
In the first byte of the first entry a copy of the media descriptor is stored. The remaining bits of this entry are 1.
In the second entry the end-of-file marker is stored. Which is FFFFH.
F0 FF FF 03 40 00 50 F0 FF
0 1 2 3 4 5 6 7 8
002 X 1.5 = 3Even 4003
003 X 1.5 = 4Odd 0040
004 X 1.5 = 6F005
005 X 1.5 = 7
FFF0
002
003
004
005
This concludes the study of the floppy disk but it has much to study in the future .
It the simplest data storage device which can be referred to study the other complex and vast data storage devices like hard disks, Compact discs, flash drives and memory cards which has the most complex physical structure.
ANY QUESTION ?
References :1.The WORLD WIDE WEB.2.WIKIPEDIA.3.GOOGLE. And4.TEACHERS.
THANK YOU !!!