]>
wirehaze git hosting - BOS.git/blob - kernel/fat12/fat12.asm
0b87c662ac429bc8c56b9596fef857f546482251
1 ;----------------------------------------------------------;
2 ; BOS kernel Christoffer Bubach, 2012-2015. ;
3 ;----------------------------------------------------------;
7 ;----------------------------------------------------------;
10 .disk_number db 0 ; which disk?
11 .root_dir dw 0 ; position of rootdir
12 .fat_1 dd 0 ; position of fat1
13 .fat_2 dd 0 ; position of fat2
14 .data_area dw 0 ; position of dataarea
18 ; ..... some other values
20 struc bootsector
; 512 bytes
23 .oem db 0,0,0,0,0,0,0,0
26 ;.... more values here
40 fd0 disk
; define fd0 data..
43 ;mov edi, drv+disk.boot
45 ;-----------------------------;
46 ; calculate root location ;
47 ;-----------------------------;
49 mov al, byte [fd0
.boot
.fats_per_drive
]
50 mul word [fd0
.boot
.sectors_per_fat
]
51 add ax, word [fd0
.boot
.reserved_sect
]
52 mov [fd0
.root_dir
], ax
55 ;mov ax, [si+disk.boot.sectorssize]
60 ; a bit more code here