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 call logdrv
mov bx, testfcb mov bx, testfcb
call fndfst call open
jc huh push ax
call putfn call printf
db "AX=",2,0x0A,0x0D,0
hlt: hlt hlt: hlt
jmp hlt jmp hlt
huh: call printf
db "huh", 0
jmp hlt
%include "kernel/far.asm" %include "kernel/far.asm"
%include "kernel/fcb.asm" %include "kernel/fcb.asm"
%include "kernel/find.asm" %include "kernel/find.asm"

View File

@ -39,15 +39,17 @@ fnfile: mov ax, [es:bx+FCBDEN]
ret ret
; initialize a FCB for directory scanning ; initialize a FCB for directory scanning
fndfst: mov word [es:bx+FCBDEN], 0 open: mov word [es:bx+FCBDEN], 0
fndnxt: call fnfile .search: call fnfile
mov al, 0xFF
jc .ret jc .ret
push si push si
lea di, [bx+1] lea di, [bx+1]
mov cx, 11 mov cx, 11
rep cmpsb rep cmpsb
pop si pop si
jne fndnxt jne .search
mov al, 0
.ret: ret .ret: ret
putfn: mov cx, 11 putfn: mov cx, 11