diff --git a/boot/kernel.asm b/boot/kernel.asm index c756f2b..4cc1913 100644 --- a/boot/kernel.asm +++ b/boot/kernel.asm @@ -32,17 +32,14 @@ init: cli call logdrv mov bx, testfcb - call fndfst - jc huh - call putfn + call open + push ax + call printf + db "AX=",2,0x0A,0x0D,0 hlt: hlt jmp hlt -huh: call printf - db "huh", 0 - jmp hlt - %include "kernel/far.asm" %include "kernel/fcb.asm" %include "kernel/find.asm" diff --git a/kernel/find.asm b/kernel/find.asm index ba2f0b9..868a809 100644 --- a/kernel/find.asm +++ b/kernel/find.asm @@ -39,15 +39,17 @@ fnfile: mov ax, [es:bx+FCBDEN] ret ; initialize a FCB for directory scanning -fndfst: mov word [es:bx+FCBDEN], 0 -fndnxt: call fnfile +open: mov word [es:bx+FCBDEN], 0 +.search: call fnfile + mov al, 0xFF jc .ret push si lea di, [bx+1] mov cx, 11 rep cmpsb pop si - jne fndnxt + jne .search + mov al, 0 .ret: ret putfn: mov cx, 11