Rename fndfst to open

This commit is contained in:
Nero 2021-01-02 02:48:04 +00:00
parent 9a1c4139a6
commit 015eea2f2f
2 changed files with 9 additions and 10 deletions

View File

@ -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"

View File

@ -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