Print a dot for each loaded sector in bootloader

This commit is contained in:
Juhani Krekelä 2021-07-06 21:54:34 +03:00
parent 283ed06d7e
commit 89e377bf2d
1 changed files with 12 additions and 11 deletions

View File

@ -298,9 +298,8 @@ execute_kernel:
jmp 0:0x500
; Note: bx will point to after the read data
; Note: ax, cx, and di will be clobbered
; Note: ax, cx, dx, and di will be clobbered
loadsectors:
push dx
.loop:
mov di, 3 + 1 ; Retry thrice, + 1 is since we dec first
@ -345,6 +344,9 @@ loadsectors:
jc .error
mov ax, 0x0e00 + '.'
int 0x10
pop cx
pop ax
@ -353,7 +355,6 @@ loadsectors:
loop .loop
pop dx
ret
.error:
@ -372,12 +373,12 @@ loadsectors:
jmp .retry
fatal_error:
lodsb
test al, al
jz hang
mov ah, 0xe
int 0x10
jmp fatal_error
mov cx, 9
.loop:
lodsb
mov ah, 0xe
int 0x10
loop .loop
hang:
hlt
@ -389,8 +390,8 @@ ettinos_kernel_cluster dw 0
ettinos_kernel_name db "SYSTEM BIN"
notfound_msg db "No kernel", 0
diskerror_msg db "Disk error", 0
notfound_msg db "No kernel"
diskerror_msg db "Disk error"
choose_msg db "(E)ttinOS/Nor86?", 0
times 510-($-$$) db 0