From 015eea2f2f978c60a0ea12595fd1b68019128c3a Mon Sep 17 00:00:00 2001 From: Nero <41307858+nero@users.noreply.github.com> Date: Sat, 2 Jan 2021 02:48:04 +0000 Subject: [PATCH] Rename fndfst to open --- boot/kernel.asm | 11 ++++------- kernel/find.asm | 8 +++++--- 2 files changed, 9 insertions(+), 10 deletions(-) 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