filesystems
FAT16 filesystems


 
Area OS development
Area Filesystems
Area PC hardware
Area Web authoring
Area MP3 management
Area PC Utilities
Area Games
Page First page
Page Site map
Page Site history
Page Site credits
Page Links
[ FAT | Folders ]


FAT

The FAT is an array of up to 65,536 16-bit unsigned integers. The first 2 and last 16 entries in the FAT are reserved. All other elements are of type: index into the FAT array. Each of the non-reserved FAT entries correspond to a cluster on the disk.

FAT index Meaning as index Meaning as value
0x0000 reserved cluster is available
0x0001 reserved undefined
0x0002-0xffef data cluster next cluster in chain is at this index
0xfff0-0xfff6 reserved undefined
0xfff7 reserved bad cluster
0xfff8-0xffff reserved end of the current cluster chain

FAT entries 0x0000 and 0x0001 contain other information, usually 0xfff8 and 0xffff respectively.

The fragment below is from the start of a FAT

FFF8 FFFF 0000 0004 FFFF 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000

The fragment above shows a file using clusters 0x0003 & 0x0004.

Folders

A folder is a data structure stored on the disk. The root folder is stored before the data area. Other folders are stored in the data area in the same way as files; These folders may grow in size, shrink in size and be stored non-contiguously in the same way as files. The structure of all folders is as an array of folder entries. The end of the folder is marked by a folder entry starting with a 00h byte.

Folder entry structure

offset length contents
0x00 0x8 name
0x08 0x3 extension
0x0b 0x1 flags
0x0c 0xa reserved
0x16 0x2 time
0x18 0x2 date
0x1a 0x2 first cluter
0x1c 0x4 size

The date field is in DOS date format, and the time field is in DOS time.

Write to CLoud

Please write to me using the envelope provided above.

This page was updated on
23 May 1999
http://www.thesky.demon.co.uk/filesystems/fat16-filesystem.html