From fea8e314e6291bd55fd96b1bec478d500b548489 Mon Sep 17 00:00:00 2001 From: czjstmax Date: Sun, 22 Feb 2026 02:33:30 +0100 Subject: initial commit i cant get the stage2 to load kernel, or the kernel to print. it's 2 am so gn for now. Signed-off-by: czjstmax --- src/boot_s2.asm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/boot_s2.asm (limited to 'src/boot_s2.asm') diff --git a/src/boot_s2.asm b/src/boot_s2.asm new file mode 100644 index 0000000..b974827 --- /dev/null +++ b/src/boot_s2.asm @@ -0,0 +1,23 @@ +; boot_stage2.asm - stage2 +[bits 32] + +global _start +extern kmain + +section .text + +_start: + ; reload segments + mov ax, 0x10 + mov ds, ax + mov es, ax + mov ss, ax + mov fs, ax + mov gs, ax + mov esp, 0x90000 ; stack + + mov dword [0xB8000], 0x07410741 + call kmain + + hlt + -- cgit v1.3.1