Print a dot for each loaded sector in bootloader
This commit is contained in:
parent
283ed06d7e
commit
89e377bf2d
23
boot.asm
23
boot.asm
|
@ -298,9 +298,8 @@ execute_kernel:
|
||||||
jmp 0:0x500
|
jmp 0:0x500
|
||||||
|
|
||||||
; Note: bx will point to after the read data
|
; 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:
|
loadsectors:
|
||||||
push dx
|
|
||||||
|
|
||||||
.loop:
|
.loop:
|
||||||
mov di, 3 + 1 ; Retry thrice, + 1 is since we dec first
|
mov di, 3 + 1 ; Retry thrice, + 1 is since we dec first
|
||||||
|
@ -345,6 +344,9 @@ loadsectors:
|
||||||
|
|
||||||
jc .error
|
jc .error
|
||||||
|
|
||||||
|
mov ax, 0x0e00 + '.'
|
||||||
|
int 0x10
|
||||||
|
|
||||||
pop cx
|
pop cx
|
||||||
pop ax
|
pop ax
|
||||||
|
|
||||||
|
@ -353,7 +355,6 @@ loadsectors:
|
||||||
|
|
||||||
loop .loop
|
loop .loop
|
||||||
|
|
||||||
pop dx
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.error:
|
.error:
|
||||||
|
@ -372,12 +373,12 @@ loadsectors:
|
||||||
jmp .retry
|
jmp .retry
|
||||||
|
|
||||||
fatal_error:
|
fatal_error:
|
||||||
lodsb
|
mov cx, 9
|
||||||
test al, al
|
.loop:
|
||||||
jz hang
|
lodsb
|
||||||
mov ah, 0xe
|
mov ah, 0xe
|
||||||
int 0x10
|
int 0x10
|
||||||
jmp fatal_error
|
loop .loop
|
||||||
|
|
||||||
hang:
|
hang:
|
||||||
hlt
|
hlt
|
||||||
|
@ -389,8 +390,8 @@ ettinos_kernel_cluster dw 0
|
||||||
|
|
||||||
ettinos_kernel_name db "SYSTEM BIN"
|
ettinos_kernel_name db "SYSTEM BIN"
|
||||||
|
|
||||||
notfound_msg db "No kernel", 0
|
notfound_msg db "No kernel"
|
||||||
diskerror_msg db "Disk error", 0
|
diskerror_msg db "Disk error"
|
||||||
choose_msg db "(E)ttinOS/Nor86?", 0
|
choose_msg db "(E)ttinOS/Nor86?", 0
|
||||||
|
|
||||||
times 510-($-$$) db 0
|
times 510-($-$$) db 0
|
||||||
|
|
Loading…
Reference in New Issue