Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

recursing subdirectories (Developers)

posted by kerravon E-mail, Ligao, Free World North, 20.10.2025, 18:02
(edited by kerravon on 22.10.2025, 03:43)

> You're supposed to set the DTA to a different buffer ("different
> DTA") whenever (before) you open a new concurrent search. The find data in
> the first DTA should be sufficient to resume the first search, when you
> reset the DTA to point to that find data, regardless of how many other
> searches you started.

Thanks for that!

I looked that up:

https://www.ctyme.com/intr/rb-2589.htm

So it is set to point to my PSP initially, which means it will wipe out my
command line.

That's fine - and it also means that there is a known size limit to the
size of the DTA - 0x80.

Although closer inspection:
https://www.ctyme.com/intr/rb-2977.htm#Table1626

suggests that this is a fixed size that won't be expanded with new DOS versions.

And that size is decimal 43 bytes.

> Alternatively you could copy the find data from a
> single DTA and stash it elsewhere, then restore it later. In any case, the
> populated find data if preserved is supposed to be able to resume
> concurrent searches regardless of what order you call the DOS.

Ok, great.

> Redirectors should try to emulate this, although the find data may not be
> large enough to reference their file system internals. So the find data can

What's a redirector?

> contain a handle, pointing to a redirector-internal find data block, which
> is cleaned up either when the search call returns "no more files", LFN find
> close is called, or eg the process terminates.

Ok, I looked those up.

LFN FindFirst: AX = 714Eh
https://www.ctyme.com/intr/rb-3203.htm
LFN FindNext: AX=714Fh
https://www.ctyme.com/intr/rb-3204.htm
LFN FindClose: AX=71A1h
https://www.ctyme.com/intr/rb-3211.htm
And the structure that includes the LFN:
https://www.ctyme.com/intr/rb-3203.htm#Table1779

And that looks like a fixed decimal 318 byte table too.

And I see that the FindFirst explicitly mentions the carry flag issue:

For compatibility with DOS versions prior to v7.00, the carry flag should be set on call to ensure that it is set on exit


EDIT: corrected LFN FindClose AX (thanks ecm)

 

Complete thread:

Back to the forum
Board view  Mix view
22747 Postings in 2119 Threads, 402 registered users, 668 users online (0 registered, 668 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum