reserve space for mbr partition table

main
pantonshire 1 year ago
parent 50353bafdd
commit 0c74d1e873

@ -34,13 +34,23 @@ bits 16
; TODO: grab all the info we can from bios interrupts and deliver it to ths OS nicely ; TODO: grab all the info we can from bios interrupts and deliver it to ths OS nicely
; e.g. in a fixed memory location ; e.g. in a fixed memory location
; Make sure we fit in a single 512-byte sector ; MBR bootstrap field is 440 bytes long
%if ($ - $$) > 510 %if ($ - $$) > 440
%error "exceeded boot sector size" %error "exceeded mbr bootstrap field size"
%endif %endif
; Pad to the boot signature offset ; Pad to the end of the MBR bootstrap field
times 440 - ($ - $$) db 0
; Unique disk ID
dd 0x00000000
; Reserved
dw 0x0000
; Zero the partition fields
; TODO: fill in the field pointing to the GPT table
times 510 - ($ - $$) db 0 times 510 - ($ - $$) db 0
; Boot signature ; Boot signature
db 0x55 db 0x55
db 0xaa db 0xaa

Loading…
Cancel
Save