做什么 ?在查看 FAT32 文件系统的 FAT 条目值的十六进制数字时是什么意思?

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

我正在编写一个操作系统,因此我需要实现一个文件系统。所以我选择了FAT32。我正在查找 FAT 条目值和它给出的值,如:0x?0000000。所以我的问题是什么?是什么意思?

我尝试用谷歌搜索答案,但它只显示十六进制教程,不包括我问题的答案

可能是时候阅读官方规范了?

fatgen103.doc 说:

A FAT32 FAT entry is actually only a 28-bit entry. The high 4 bits of a FAT32 FAT entry are reserved. 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.

A bit more explanation is in order here, because this point about FAT32 FAT entries seems to cause a great deal of confusion. Basically 32-bit FAT entries are not really 32-bit values; they are only 28-bit values. 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. 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. 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.