From 8cda624e501df9f9809786f3cc4e638e3b2ca974 Mon Sep 17 00:00:00 2001 From: mothcompute Date: Sat, 5 Nov 2022 14:27:23 -0700 Subject: [PATCH] some setup for filesystems --- config.s | 1 + src/boot.s | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) 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