]> git.dujemihanovic.xyz Git - nameless-os.git/blob - boot/x86/fat32-structs.s
e72735d82bd29a29a7c80224a50c7a1134d9bed0
[nameless-os.git] / boot / x86 / fat32-structs.s
1 ; FAT32 data structures
2 ; Because they have to be defined before use
3
4 struc dir_entry
5 .name: resb 11
6 .attr: resb 1
7 .ntres: resb 1
8 .crttimetenth: resb 1
9 .crttime: resw 1
10 .crtdate: resw 1
11 .lstaccdate: resw 1
12 .firstclushi: resw 1
13 .wrttime: resw 1
14 .wrtdate: resw 1
15 .firstcluslo: resw 1
16 .filesize: resd 1
17 endstruc
18
19 ; BPB definition, we use offsets to bp to save space
20 %define BS_jmpBoot [bp]
21 %define BS_OemName [bp+0x3]
22 %define BPB_BytsPerSec [bp+0xb]
23 %define BPB_SecPerClus [bp+0xd]
24 %define BPB_RsvdSecCnt [bp+0xe]
25 %define BPB_NumFats [bp+0x10]
26 %define BPB_RootEntCnt [bp+0x11]
27 %define BPB_TotSec16 [bp+0x13]
28 %define BPB_Media [bp+0x15]
29 %define BPB_FatSz16 [bp+0x16] ; count of sectors
30 %define BPB_SecPerTrk [bp+0x18]
31 %define BPB_NumHeads [bp+0x1a]
32 %define BPB_HiddSec [bp+0x1c]
33 %define BPB_TotSec32 [bp+0x20]
34 %define BPB_FatSz32 [bp+0x24]
35 %define BPB_ExtFlags [bp+0x28]
36 %define BPB_FSVer [bp+0x2a]
37 %define BPB_RootClus [bp+0x2c]
38 %define BPB_FsInfo [bp+0x30]
39 %define BPB_BkBootSec [bp+0x32] ; number of sector
40 %define BPB_Reserved [bp+0x34]
41 %define BS_DrvNum [bp+0x40]
42 %define BS_Reserved1 [bp+0x41]
43 %define BS_BootSig [bp+0x42]
44 %define BS_VolId [bp+0x43]
45 %define BS_VolLab [bp+0x47]
46 %define BS_FilSysType [bp+0x52]
47