Chapter
1
I
System Calls
SearchNext
Search
for
Next Entry
Function Call
12H
Used after Function
Call
1lH
(Search for
First
Entry) to find
additional directory entries that match a filename that contains
wildcard characters. The
?
wildcard character in the filename
matches any character. This call searches the disk directory for
the next matching name.
To
search for hidden or system files,
DS:DX must point to the
first
byte of the extended FCB prefix.
If a directory entry for the filename in the FCB is found, an un-
opened FCB of the same type (normal or extended)
is
created
at
the Disk Transfer Address.
Entry Conditions:
AH
=
12H
DS:DX
=
pointer to the
unopened
FCB
of
the
file for which
to
search
Exit Conditions:
If AL
=
BBH,
a
directory entry was found.
If AL
=
FFH, no directory entry was found.
Macro
Definition:
search-next macro fcb
mov
dx,offset fcb
mOV
ah,l2H
int 21
H
endm
54