Implement cluster chaining for FAT

This commit is contained in:
Nero 2020-03-28 17:36:52 +00:00
parent 76880e9275
commit 5a24ceb9b8

View File

@ -172,11 +172,22 @@ floop: add ax, [sf]
cmp cl, [sc]
jne err
xchg bx, cx
mov cl, 5
sal bx, cl
add [dest], bx
add sp, 12
ret
main: call readc
loadf: call readc
call next
cmp word [clus+2], 0x0FFF
jne loadf
ret
main: call loadf
mov ax, [dest]
int 3
xor ah,ah
@ -187,12 +198,13 @@ main: call readc
; the packing is so that it looks nice in a hexdump
times (0x1E0 - ($-$$)) db 0
; directory the kernel is in
tdir: db "RDOS "
tdir: db "RDOS ", 0
; current cluster number
clus: dd 2
times (0x1F0 - ($-$$)) db 0
; filename for hte kernel
tfile: db "KERNEL BS "
; filename for the kernel
tfile: db "KERNEL BS ", 0
; segment register for data
dest: dw 0x07c0