Implement cluster chaining for FAT
This commit is contained in:
parent
76880e9275
commit
5a24ceb9b8
20
fat32.asm
20
fat32.asm
@ -172,11 +172,22 @@ floop: add ax, [sf]
|
|||||||
cmp cl, [sc]
|
cmp cl, [sc]
|
||||||
jne err
|
jne err
|
||||||
|
|
||||||
|
xchg bx, cx
|
||||||
|
mov cl, 5
|
||||||
|
sal bx, cl
|
||||||
|
add [dest], bx
|
||||||
|
|
||||||
add sp, 12
|
add sp, 12
|
||||||
ret
|
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
|
int 3
|
||||||
|
|
||||||
xor ah,ah
|
xor ah,ah
|
||||||
@ -187,12 +198,13 @@ main: call readc
|
|||||||
; the packing is so that it looks nice in a hexdump
|
; the packing is so that it looks nice in a hexdump
|
||||||
times (0x1E0 - ($-$$)) db 0
|
times (0x1E0 - ($-$$)) db 0
|
||||||
; directory the kernel is in
|
; directory the kernel is in
|
||||||
tdir: db "RDOS "
|
tdir: db "RDOS ", 0
|
||||||
; current cluster number
|
; current cluster number
|
||||||
clus: dd 2
|
clus: dd 2
|
||||||
|
|
||||||
times (0x1F0 - ($-$$)) db 0
|
times (0x1F0 - ($-$$)) db 0
|
||||||
; filename for hte kernel
|
; filename for the kernel
|
||||||
tfile: db "KERNEL BS "
|
tfile: db "KERNEL BS ", 0
|
||||||
; segment register for data
|
; segment register for data
|
||||||
dest: dw 0x07c0
|
dest: dw 0x07c0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user