From 7519806d1bfaef930f0df75e5de3c8c3368d4cdf Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Wed, 11 Aug 2021 19:11:22 +0200 Subject: [PATCH] Kernel execution --- compile.sh | 2 +- src/bootloader.asm | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/compile.sh b/compile.sh index ccdc9cd..57f142e 100755 --- a/compile.sh +++ b/compile.sh @@ -12,5 +12,5 @@ nasm -f bin $srcDir/bootloader.asm -i $srcDir -o $binDir/bootloader.bin && echo echo -n "Compiling kernel... " gcc -ffreestanding -c $srcDir/kernel.c -o $binDir/kernel.o && ld -o $binDir/kernel.bin -Ttext 0x1000 $binDir/kernel.o --oformat binary 2>/dev/null && echo $done -echo -n "Creating kernel image... " +echo -n "Creating OS image... " cat $binDir/bootloader.bin $binDir/kernel.bin > $binDir/os-image && echo $done diff --git a/src/bootloader.asm b/src/bootloader.asm index c66640c..b477677 100644 --- a/src/bootloader.asm +++ b/src/bootloader.asm @@ -25,9 +25,13 @@ %include "pm.asm" BEGIN_PM: - mov ebx, stat_pm_init + ; Inform of mode switch + mov ebx, stat_boot_success call vga_print + ; Execute kernel code + call KERNEL_OFFSET + jmp $ [bits 16]