Kernel loading

pull/17/head
E. Almqvist 3 years ago
parent e7adf5528e
commit 1bba97155d
  1. 14
      src/bootloader.asm

@ -9,9 +9,13 @@
mov sp, bp
; Load kernel into memory
mov bx, stat_kernel_load
call println
call load_kernel
; Switching to PM
mov bx, stat_pm_init
call println
call pm_preinit
jmp $ ; inf loop
@ -21,13 +25,14 @@
%include "pm.asm"
BEGIN_PM:
mov ebx, welcome_string
mov ebx, stat_pm_init
call vga_print
jmp $
[bits 16]
load_kernel:
mov bx, KERNEL_OFFSET ; Load kernel at the kernel offset
mov dh, 15 ; Read 15 sectors
@ -36,12 +41,9 @@ load_kernel:
ret
welcome_string: db "e Operating-System (eOS): Version 2021 0.0", ASCII_END
stat_realmode: db "Entering 16bit Real Mode...", ASCII_END
stat_pm_init: db "Entering 32bit Protected Mode...", ASCII_END
stat_success: db " [OK]", ASCII_CARRIAGE_RETURN, ASCII_NEWLINE, ASCII_END
stat_kernel_load: db "Loading kernel into memory...", ASCII_END
stat_boot_success: db "Booting complete!", ASCII_END
BOOT_DRIVE: db 0

Loading…
Cancel
Save