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
; e.g. in a fixed memory location
; Make sure we fit in a single 512-byte sector
%if ($ - $$) > 510
%error "exceeded boot sector size"
; MBR bootstrap field is 440 bytes long
%if ($ - $$) > 440
%error "exceeded mbr bootstrap field size"
%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
; Boot signature
db 0x55
db 0xaa

Loading…
Cancel
Save