Nicer error messages + bootsector fix
This commit is contained in:
parent
e8e03d7ed1
commit
070de9c196
|
@ -47,9 +47,9 @@ jmp $ ; Keeps jumping at the current address (loops forever)
|
|||
|
||||
; Here we define our variables: They need to be defined after the
|
||||
; halting because otherwise they will be executed as code
|
||||
real_mode_msg: db "TSBL is starting up", 0
|
||||
protected_mode_msg: db "Switched to protected mode", 0
|
||||
loading_kernel_msg: db "Loading kernel into memory", 0
|
||||
real_mode_msg: db "TSOS: Booting", 0
|
||||
protected_mode_msg: db "TSOS: Protected mode OK", 0
|
||||
loading_kernel_msg: db "TSOS: Loading kernel", 0
|
||||
boot_drive: db 0
|
||||
|
||||
|
||||
|
@ -58,7 +58,7 @@ load_kernel: ; Loads the kernel into memory
|
|||
mov si, loading_kernel_msg
|
||||
call bios_println
|
||||
mov bx, kernel_offset
|
||||
mov dh, 4
|
||||
mov dh, 3
|
||||
mov dl, [boot_drive]
|
||||
call load_disk
|
||||
ret
|
||||
|
|
|
@ -57,5 +57,5 @@ disk_loop:
|
|||
jmp $
|
||||
|
||||
|
||||
disk_read_error_msg: db "Read error: ", 0
|
||||
disk_sectors_error_msg: db "Sector read count error", 0
|
||||
disk_read_error_msg: db "TSOS: Read error: ", 0
|
||||
disk_sectors_error_msg: db "TSOS: Sector read count error", 0
|
||||
|
|
|
@ -26,7 +26,7 @@ i32 kmain(void) {
|
|||
|
||||
// Newline so we skip the log
|
||||
// messages from the bootloader
|
||||
kprint("\nTSOS kernel started!");
|
||||
kprint("\nTSOS: Kernel load OK");
|
||||
// TODO...
|
||||
return 0x022172; // :D
|
||||
}
|
Loading…
Reference in New Issue