diff --git a/fat32.asm b/fat32.asm index 8ca23b8..78e9ca7 100644 --- a/fat32.asm +++ b/fat32.asm @@ -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