From 84f3aaac705dd6086355e760e3826e81161db04e Mon Sep 17 00:00:00 2001 From: fslongjin Date: Mon, 17 Jan 2022 16:50:48 +0800 Subject: [PATCH] =?UTF-8?q?:wrench:=20=E6=8A=8AFAT12=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E7=9A=84=E5=8F=82=E6=95=B0=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E5=8D=95=E7=8B=AC=E6=8F=90=E5=8F=96=E5=87=BA=E6=9D=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bootloader/fat12.inc | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 bootloader/fat12.inc diff --git a/bootloader/fat12.inc b/bootloader/fat12.inc new file mode 100644 index 00000000..104a757e --- /dev/null +++ b/bootloader/fat12.inc @@ -0,0 +1,25 @@ +; === 这是FAT12文件系统的信息 === +RootDirSectors equ 14 ;根目录占用的扇区数 +SectorNumOfRootDirStart equ 19 ; 根目录的起始扇区号 +SectorNumOfFAT1Start equ 1 ; FAT1表的起始扇区号 (因为前面有一个保留扇区(引导扇区)) +SectorBalance equ 17 ;平衡文件/目录的起始簇号与数据区域的起始簇号的差值。 + + BS_OEMName db 'DragonOS' + BPB_BytesPerSec dw 512 + BPB_SecPerClus db 1 + BPB_RsvdSecCnt dw 1 + BPB_NumFATs db 2 + BPB_RootEntCnt dw 224 + BPB_TotSec16 dw 2880 + BPB_Media db 0xf0 + BPB_FATSz16 dw 9 + BPB_SecPerTrk dw 18 + BPB_NumHeads dw 2 + BPB_HiddSec dd 0 + BPB_TotSec32 dd 0 + BS_DrvNum db 0 + BS_Reserved1 db 0 + BS_BootSig db 0x29 + BS_VolID dd 0 + BS_VolLab db 'boot loader' + BS_FileSysType db 'FAT12 ' \ No newline at end of file