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