FAT: Data Organization Format on Disk

xiaoxiao2021-03-06  128

Microsoft hardware white paper

FAT: Data Organization Format on Disk Ability to Comprehensive /// This document is agreed in this document: the number with "0x" is a 16-way number. Any other numbers that have no prefix "0x" are 10 credits. All code snippets in this document are used in 'c' language. However, there is no strict compliance with its code input specification and grammar. Some code snippets in this document use 32-bit and 16-bit data elements. We assume that you are a programmer who knows how to convert 32-bit data into 16-bit data (guaranteed data is not lost). At the same time, it must be noted that all data types are unsigned. Do not use a symbolic integer data to perform the calculations required to make a FAT table, as this calculated result is incorrect to some FAT systems. General Concepts (suitable for all types of FAT file systems) All FAT file systems are initially developed for IBM PC architecture. It is important to: The data structure of the FAT file system on disk is "small end" (a data storage organization form). Let's take a look at a 32-bit FAT entry, which is stored on disk in 4 8-bit bytes ----- The first byte is Byte [0], the last one is Byte [4] ------ The following shows a 32-bit data, from 00 ID, until 31. (00 is the least important one)

Byte [3] 3 3 2 2 2 2 2 2 1 0 9 8 7 6 5 4

Byte [2] 2 2 2 2 1 1 1 1 3 2 1 0 9 8 7 6

Byte [1] 1 1 1 1 1 1 0 0 5 4 3 2 1 0 9 8

Byte [0] 0 0 0 0 0 0 0 0 7 6 5 4 3 2 1 0

If you use the machine based on "big end", some of the above principles is very important. Because you want to exchange data with the disk, you must convert between the big end and the small end.

A FAT file system consists of the following four basic districts, they are:

0 --- Reserved Area 1 --- FAT Region 2 - Root Catalog Zone (there is no existence in the FAT32 system) 3 --- File and Directory Data Area

Start sector and bpb (Bios Parameter Block)

转载请注明原文地址:https://www.9cbs.com/read-127178.html

New Post(0)