Compare commits

...

2 Commits

Author SHA1 Message Date
Juhani Krekelä 89e377bf2d Print a dot for each loaded sector in bootloader 2021-07-06 21:54:34 +03:00
Juhani Krekelä 283ed06d7e Ignore deleted files in bootloader 2021-07-06 21:50:56 +03:00
1 changed files with 17 additions and 13 deletions

View File

@ -120,14 +120,17 @@ search_root:
cmp byte [si], 0
je .end
; Deleted file?
cmp byte [si], 0xe5
je .skipentry
test byte [si + 11], 0x08 + 0x10
jnz .skipentry
; Make sure the file has non-zero size
; File size must be <32K anyways so don't bother with >64K
cmp word [si + 28], 0
jne .isfile
cmp word [si + 30], 0
jne .isfile
.skipentry:
add si, 32
@ -295,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
@ -342,6 +344,9 @@ loadsectors:
jc .error
mov ax, 0x0e00 + '.'
int 0x10
pop cx
pop ax
@ -350,7 +355,6 @@ loadsectors:
loop .loop
pop dx
ret
.error:
@ -369,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
@ -386,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