BOOT,FAT16结构

news/2024/7/5 19:47:44

 

以下资料仅供参考:

----------------------------------------------------------------------------------------

目录项(Directory Entries)

文件属性字节(File attribute byte)

FAT16结构(FAT16 structure)

磁盘引导记录结构(BOOT record layout)

 

目录项(Directory Entries)

offset

length

description

format

comments

00H

8 bytes

filename

ASCII chars,or special code if first char:

00H=name never used

05H=first character or name is realy E5H

E5H=file was used,but has been erased

2EH=entry is a directory

must be padded with spaces to fill field

08H

3 bytes

file type(extension)

ASCII chars

must be padded with spaces to fill field

0BH

byte

file attribute

bit codes:

bit0=read-only

bit1=hidden

bit2=system

bit3=volumn label

bit4=directory

bit5=archive

bit6=unused

bit7=unused

0CH

10 bytes

reserved

16H

word

time file last updated

coded word:(unsigned 16 bit-bit integer) time=Hr*2048+Min*32+Sec+2

*:least significant byte first

18H

word

date file last updated

coded word:(unsigned 16 bit-bit integer) time=(Yr-1980)*512+Mon*32+Day

*:least significant byte first

1AH

word

starting cluster number

word binary integer*

1CH

dbl word

file size

double word binary integer*

目录项(Directory Entries)

文件属性字节(File attribute byte)

FAT16结构(FAT16 structure)

磁盘引导记录结构(BOOT record layout)

文件属性字节(File attribute byte)

76543210meaning if set to 1meaning if set to 0
       vread-only fileread/write file
      v hidden filevisible file
     v  system fileregular file
    v   volumn nameregular file
   v    directory nameregular file
  v     file changed since last backupfile unchanged since last backup
vv      reservedreserved

 

 

目录项(Directory Entries)

文件属性字节(File attribute byte)

FAT16结构(FAT16 structure)

磁盘引导记录结构(BOOT record layout)

 

FAT16结构(FAT16 structure):

Entry

Example Value

Use

0

FFF8

Disk ID byte

1

FFFF

Filler

2

0003

Cluster value:

0000     = unused cluster

0002-ffff= next cluster number

fff0-fff6= reserved cluster

fff7     = cluster marked bad

fff8-ffff= last cluster in file

3

0004

4

0005

5

FFFF

6

0000

                                                                                 

 

目录项(Directory Entries)

文件属性字节(File attribute byte)

FAT16结构(FAT16 structure)

磁盘引导记录结构(BOOT record layout)

 

 

磁盘引导记录结构(BOOT record layout)

 

dos3.3 and dos4.0 BOOT record layout

offsetlengthdescriptionDOS version
003 bytesJMP to boot code 
038 bytesOEM name and version  
0Bwordbytes per sector 
0Dbytesectors per cluster(must be a power of 2) 
0Ewordreserved sectors(for Dir,FAT,etc.) 
10byteNumber of copies of FAT 
11wordMaximum number of root directory entries 
13wordTotal number of sectors in logical image 
15byteMedia descriptor byte 
16wordnumber of sectors in FAT 
18wordnumber of sectors per track 
1Awordnumber of heads 
1Cwordnumber of hidden sectors 
1EwordHO number of hidden sectors 
20dbl wordnumber of logical sectors 

 

DOS5.0 BOOT sector structrure

offset

length

description

DOS version

1E

dbl word

number of hidden sectors

DOS 5.0 boot sector

structure

22

dbl word

number of sectors if the size of the drive is larger than 32MB

23

byte

drive number used Internally by DOS

24

byte

reserved

25

byte

boot signature. always 29H.

29

dbl word

volumn ID number

34

11 bytes

Volumn label

3C

8 bytes

file-system type

 

目录项(Directory Entries)

文件属性字节(File attribute byte)

FAT16结构(FAT16 structure)

磁盘引导记录结构(BOOT record layout)

----------------------------------------------------------------------------------------





http://www.niftyadmin.cn/n/3657311.html

相关文章

Tip - SQL报表打印的空白页问题

SQL报表中一个常见问题是:在HTML格式中报表看起来还不错,但是打印出来(或者在PDF格式中)却发现每一个页面后面都跟着一个空白页。这是因为报表的设计尺寸超过了打印页面的物理尺寸。那么如何设置报表的尺寸适合打印呢?…

Linux i2c驱动框架分析 (三)

Linux i2c驱动框架分析 (一) Linux i2c驱动框架分析 (二) Linux i2c驱动框架分析 (三) 通用i2c设备驱动分析 i2c适配器驱动 i2c适配器驱动加载与卸载 i2c总线驱动模块的加载函数要完成两个工作。 初始化…

.NET 格式字符串速查

.NET编程及SQL报表中常用到数字或者日期的格式转化,那些格式字符总是记不住,索性列出来备查:Standard numeric format strings: http://msdn2.microsoft.com/en-us/library/aa720653.aspxCustom numeric format strings: http://msdn2.micros…

通用i2c设备驱动分析

Linux i2c驱动框架分析 (一) Linux i2c驱动框架分析 (二) Linux i2c驱动框架分析 (三) 通用i2c设备驱动分析 内核提供了一个通用的i2c驱动,这个驱动程序为每个适配器提供了设备文件的功能&…

Linux spi驱动框架分析(一)

本次的spi专题,主要参考:这位大佬的博客 感觉大佬们的无私奉献,而我写博客的初衷除了记录自己的学习经历之外,同时也分享给大家,分享知识。 系列文章: Linux spi驱动框架分析(一) L…

软件架构师

软件企业中有一个角色叫做软件架构师,不同公司或者不同的环境下,对该职位的定位可能不尽相同。微软首席架构师Ray Ozzie 对自己职位的一些看法,倒是给人很多启发:1. 不管是设计一座桥梁还是一幢大厦,你是在特定的情况下…

Linux spi驱动框架分析(二)

系列文章: Linux spi驱动框架分析(一) Linux spi驱动框架分析(二) Linux spi驱动框架分析(三) Linux spi驱动框架分析(四) spi core spi核心(dervers/spi/s…

Linux spi驱动框架分析(三)

系列文章: Linux spi驱动框架分析(一) Linux spi驱动框架分析(二) Linux spi驱动框架分析(三) Linux spi驱动框架分析(四) spi_master驱动 spi_master驱动负责最底层的…