📄 dosfmt.h
字号:
//< dosfmt.h >
/***************************************************************************
Define Definition
***************************************************************************/
#define MAX_CLUSTERS12 4085L /* Max Clusters for use FAT12 */
/***************************************************************************
Master Boot Sector, Partition Boot Sector Difinetion
***************************************************************************/
struct PEntry {
unsigned char x86boot; /* x86 defaut boot partition */
unsigned char StartHead; /* Start Head */
unsigned char StartSector; /* Start Sector */
unsigned char StartCylinder; /* Start Cylinder */
unsigned char PartitionType; /* Partition Type */
unsigned char EndHead; /* End Head */
unsigned char EndSector; /* End Sector */
unsigned char EndCylinder; /* End Cylinder */
unsigned long LogStartSector; /* Logical Start Sector */
unsigned long NumSectors; /* Number of All Sectors */
};
struct MBSECTOR {
unsigned char BootCode[446]; /* Boot Code */
struct PEntry P1; /* Partition Entry 1 */
struct PEntry P2; /* Partition Entry 2 */
struct PEntry P3; /* Partition Entry 3 */
struct PEntry P4; /* Partition Entry 4 */
unsigned short Signature; /* Signature word */
};
__packed
struct PBSECTOR {
unsigned char JmpCode[3]; /* JMP instruction to PBR boot code */
unsigned char OEMName[8]; /* OEM Name and version */
/* BIOS Parameter Block ***********/
unsigned short BytesPerSector; /* Number of bytes per sector */
unsigned char SectorsPerCluster; /* Number of sectors in a cluster */
unsigned short ReservedSectors; /* ReservedSectors */
unsigned char NumFATs; /* Number of FATs on the media */
unsigned short RootDirEntries; /* Number of Root Directory entries */
unsigned short TotalSectors; /* Number of sectors on media */
unsigned char MediaIDByte; /* Used to quickly identify */
unsigned short NumFATSectors; /* Number of sectors in each FAT */
unsigned short SectorsPerTrack; /* Number of sectors on a track */
unsigned short NumHeads; /* Number of Heads */
unsigned long HiddenSectors; /* Number of Hidden sectors */
unsigned long HugeSectors; /* Number of Sectors on media */
/* BIOS Parameter Block ***********/ /* if TotalSectors is zero */
unsigned char Dummy[3];
unsigned char VolumeID[4]; /* Volume ID or Serial Nimber */
unsigned char VolumeLabel[11]; /* Volume Label */
unsigned char FileSysType[8]; /* FatSysType */
unsigned char BootCode[SECTSIZE-64];/* Boot code */
unsigned short Signature; /* Signature word */
};
/***************************************************************************/
union BOOTSECT{
struct MBSECTOR MBSect;
struct PBSECTOR PBSect;
unsigned char Buffer[SECTSIZE];
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -