diff --git a/config.s b/config.s index 051360c..b83f73d 100644 --- a/config.s +++ b/config.s @@ -3,3 +3,4 @@ NUMSEG equ 4; TODO build system should calculate this value ; might be good to move one of these into the high memory area KERNEL_SEG equ 0x50 STACK_SEG equ 0x1050 +BOOTPART equ 0 ; 0-3 diff --git a/src/boot.s b/src/boot.s index 9ee92cc..b80b339 100644 --- a/src/boot.s +++ b/src/boot.s @@ -36,5 +36,28 @@ retf ; TODO filesystem and reserve space for mbr partition table +times 446 - ($-$$) db 0 +times bootpart*16 db 0 + +; some programs do not accept values with bits 0-6 set +status db 0 + +; chs offset :/ +off_head db 0 +off_sector_cyl db 0 +off_cyl_low db 0 + +; https://en.wikipedia.org/wiki/Partition_type +type db 0 + +; chs... end? +end_head db 0 +end_sector_cyl db 0 +end_cyl_low db 0 + +; lba :) +lba_off dd 0 +lba_len dd 0 + times 510 - ($-$$) db 0 dw 0xAA55