Professional Documents
Culture Documents
System
A Walk Through Experiment
Jerry Breecher
November, 2008
1
Directory Structure
Here are the contents of this disk:
A_Dir
FileInSubdir
File1
File2
ThisIsAFileWithAVeryLongName
Disk Structure
Heres the overall structure of the disk. Note that all addresses are given in both
Decimal and Hexadecimal. Generally well use Hex along the way here.
Sector
Number
Sector
Number
(Hex)
What it does
Boot Track
1-9
1-9
10 - 18
0Ax 12x
19 - 32
13X 20X
File / Directory
Data Area
33 - 2879
21X - B3Fx
Sector 000x
Location
# Bytes
01E
Meaning
Value
OS Boot Loader
01C
# Hidden Sectors
01A
# Heads
018
# Sectors / Track
18 (12x)
016
# sectors/ FAT
015
Media Bytes
F0: (floppy)
013
# logical sectors
2880(0B40x)
011
224 (00E0x)
010
# FATS
00E
# Boot Sectors
00D
# Sectors/Cluster
00B
# Bytes/Sector
512 (0200x)
003
OEM Name ID
MSDOS5.0
000
Jmp to loader
EB 3C 90
10
Sector 001x
0 1 2 3 4 5 6 7 8 9 A B C D E F 10 11 12 13 14
F0 FF FF FF FF FF FF 6F 00 07 80 00 09 A0 00 0B F0 FF FF 0F 00
Cluster 2 3 4
These files have a single
sector
Cluster 6: Aims
at Cluster 7
FF FF Padding
F0 means its a floppy.
Cluster A: Aims
at Cluster B
Cluster 7: Aims
at Cluster 8
Cluster 5: Aims
at Cluster 6
Cluster C: Last
Sector (FFF)
Cluster 9: Aims
at Cluster A
Cluster 8: Aims
at Cluster 9
Cluster B: Last
Sector (FFF)
11
Sector 00Ax
This is the
second FAT
identical to the
first.
Starting
Cluster
6 7 8 9 A B FFF
12
Directory Information
Directory Entries hold information about the files or directories that are in that
directory. Below is the format for a directory entry.
Attribute
Offset
Filename
Filename Extension
File Attributes
reserved
10
Creation Time
16
Creation Date
18
1A
File Length
1C
See the next page for additional information about many of these fields.
13
Directory Information
Attribute
Offset
Number of bytes
in field
Filename
Filename Extension
File Attributes
reserved
10
Creation Time
16
Creation Date
18
Pointer to cluster in
FAT
1A
File Length
1C
Creation Time:
bits 0 4 seconds/2 (0 29)
bits 5 10 minutes ( 0 59)
bits 11 15 hours ( 0 23 )
Creation Date:
bits 0 4 date (1 31)
bits 5 8 month ( 1 - 12)
bits 9 15 year since 1980
14
Root Directory
Attribute
Sector 013x
Offset
Number of bytes in
field
Example
Filename
File2
Filename Extension
---
File Attributes
20
reserved
10
Creation Time
16
03 79
Creation Date
18
65 39
1A
File Length
1C
0D23
15
Sector 021x
This contains the contents of the subdirectory, A_Dir. Note that the
format of a file entry is the same as for the root directory.
16
Sector 022x
17
Sector 023x
18
Sector 024x
19
Sector 02Ax
20
Sector 02Bx
21
Sector 02Cx
This sector has been formatted with F6 but there is no data in it. Its
ready to be allocated since its cluster location in the FAT has a 0 in it.
22