简体   繁体   English

做什么 ? FAT32文件系统的FAT条目值的十六进制数表示什么?

[英]What do ? mean when looking at hexadecimal numbers for FAT entry values for the FAT32 filesystem?

I am writing an operating system, therefore I need to implement a filesystem. 我正在编写一个操作系统,因此需要实现一个文件系统。 So I chose FAT32. 所以我选择了FAT32。 I was looking up FAT entry values and for the values it gave numbers like: 0x?0000000. 我正在查找FAT条目值,并为它给出的值像0x?0000000。 So my question is what does the ? 所以我的问题是什么? mean? 意思?

I have tried googling the answer but it only shows tutorials on hexadecimal, which don't include the answer to my question 我已经尝试使用Google搜索的答案,但只显示了十六进制的教程,其中不包含我的问题的答案

It's probably time to read the official specification? 现在可能是时候阅读官方规范了?

fatgen103.doc says: fatgen103.doc说:

A FAT32 FAT entry is actually only a 28-bit entry. FAT32 FAT条目实际上只是一个28位条目。 The high 4 bits of a FAT32 FAT entry are reserved. FAT32 FAT条目的高4位被保留。 The only time that the high 4 bits of FAT32 FAT entries should ever be changed is when the volume is formatted, at which time the whole 32-bit FAT entry should be zeroed, including the high 4 bits. 唯一一次更改FAT32 FAT条目的高4位是在格式化卷时,此时应将整个32位FAT条目清零,包括高4位。

A bit more explanation is in order here, because this point about FAT32 FAT entries seems to cause a great deal of confusion. 这里需要更多说明,因为关于FAT32 FAT条目的这一点似乎引起很多混乱。 Basically 32-bit FAT entries are not really 32-bit values; 基本上32位FAT条目并不是真正的32位值。 they are only 28-bit values. 它们仅为28位值。 For example, all of these 32-bit cluster entry values: 0x10000000, 0xF0000000, and 0x00000000 all indicate that the cluster is FREE, because you ignore the high 4 bits when you read the cluster entry value. 例如,所有这些32位群集条目值:0x10000000、0xF0000000和0x00000000都表明该群集是空闲的,因为在读取群集条目值时会忽略高4位。 If the 32-bit free cluster value is currently 0x30000000 and you want to mark this cluster as bad by storing the value 0x0FFFFFF7 in it. 如果32位可用群集的当前值为0x30000000,并且您想通过在其中存储值0x0FFFFFF7将该群集标记为坏群集。 Then the 32-bit entry will contain the value 0x3FFFFFF7 when you are done, because you must preserve the high 4 bits when you write in the 0x0FFFFFF7 bad cluster mark. 然后,完成后32位条目将包含值0x3FFFFFF7,因为在写入0x0FFFFFF7错误簇标记时必须保留高4位。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM