Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

Chemistry is applied theology. -- Augustus Stanley Owsley III


devel / comp.os.msdos.programmer / Re: directory recursion

SubjectAuthor
* directory recursionmuta...@gmail.com
+* directory recursionR.Wieser
|`* directory recursionmuta...@gmail.com
| `* directory recursionR.Wieser
|  `* directory recursionmuta...@gmail.com
|   `* directory recursionR.Wieser
|    `* directory recursionmuta...@gmail.com
|     `* directory recursionR.Wieser
|      `- directory recursionmuta...@gmail.com
`- directory recursionSteve Nickolas

1
directory recursion

<ae4343ff-1f95-4e4c-9e5b-09365beb5ac4n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=629&group=comp.os.msdos.programmer#629

  copy link   Newsgroups: comp.os.msdos.programmer
X-Received: by 2002:a05:620a:3c1:b0:6b8:e6e1:2950 with SMTP id r1-20020a05620a03c100b006b8e6e12950mr14324087qkm.651.1660644097073;
Tue, 16 Aug 2022 03:01:37 -0700 (PDT)
X-Received: by 2002:a05:6870:961d:b0:10d:7606:b212 with SMTP id
d29-20020a056870961d00b0010d7606b212mr8310694oaq.166.1660644096599; Tue, 16
Aug 2022 03:01:36 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.us.feeder.erje.net!feeder.erje.net!border-1.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.msdos.programmer
Date: Tue, 16 Aug 2022 03:01:36 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=110.54.195.76; posting-account=CeHKkQoAAAAowY1GfiJYG55VVc0s1zaG
NNTP-Posting-Host: 110.54.195.76
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ae4343ff-1f95-4e4c-9e5b-09365beb5ac4n@googlegroups.com>
Subject: directory recursion
From: mutazilah@gmail.com (muta...@gmail.com)
Injection-Date: Tue, 16 Aug 2022 10:01:37 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 8
 by: muta...@gmail.com - Tue, 16 Aug 2022 10:01 UTC

How does dir /s and xcopy and zip
manage to descend into subdirectories and
come out and continue?

Do they make a private copy of the DTA
structure and restore it?

That contains all the necessary information?

Re: directory recursion

<tdg4s3$1pnp$1@gioia.aioe.org>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=630&group=comp.os.msdos.programmer#630

  copy link   Newsgroups: comp.os.msdos.programmer
Path: i2pn2.org!i2pn.org!aioe.org!XakcSTEO51npqVb7OVl71w.user.46.165.242.75.POSTED!not-for-mail
From: address@not.available (R.Wieser)
Newsgroups: comp.os.msdos.programmer
Subject: Re: directory recursion
Date: Tue, 16 Aug 2022 15:08:06 +0200
Organization: Aioe.org NNTP Server
Lines: 23
Message-ID: <tdg4s3$1pnp$1@gioia.aioe.org>
References: <ae4343ff-1f95-4e4c-9e5b-09365beb5ac4n@googlegroups.com>
Injection-Info: gioia.aioe.org; logging-data="59129"; posting-host="XakcSTEO51npqVb7OVl71w.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Notice: Filtered by postfilter v. 0.9.2
X-Priority: 3
X-MSMail-Priority: Normal
X-RFC2646: Format=Flowed; Original
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
 by: R.Wieser - Tue, 16 Aug 2022 13:08 UTC

muta,

> Do they make a private copy of the DTA
> structure and restore it?

That is one way to do it. Another is to create a new DTA record and use
INT 21h, AH=1Ah to make it the active one

You only need to save the part upto (not included) the (returned)
file-attribute field (at offset 0x15) though.

> That contains all the necessary information?

Yes, AFAIK it does.

By the way, I most always use a function recursion to create the folder
recursion : when the function encounters a folder I call the function
itself, but with the path to the just-found folder.

Regards,
Rudy Wieser

Re: directory recursion

<alpine.DEB.2.21.2208161356470.3840@sd-119843.dedibox.fr>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=631&group=comp.os.msdos.programmer#631

  copy link   Newsgroups: comp.os.msdos.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: usotsuki@buric.co (Steve Nickolas)
Newsgroups: comp.os.msdos.programmer
Subject: Re: directory recursion
Date: Tue, 16 Aug 2022 13:59:37 -0400
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <alpine.DEB.2.21.2208161356470.3840@sd-119843.dedibox.fr>
References: <ae4343ff-1f95-4e4c-9e5b-09365beb5ac4n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII; format=flowed
Injection-Info: reader01.eternal-september.org; posting-host="505324e6306cd59aa0661abf10ec4d4d";
logging-data="137773"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+qr6fBOEAwMPBjlr6cHO0pQDiVbPjZZQY="
User-Agent: Alpine 2.21 (DEB 202 2017-01-01)
Cancel-Lock: sha1:SCYIfwfqhkyJarwCGRsosQZBoJE=
X-X-Sender: mary@sd-119843.dedibox.fr
In-Reply-To: <ae4343ff-1f95-4e4c-9e5b-09365beb5ac4n@googlegroups.com>
 by: Steve Nickolas - Tue, 16 Aug 2022 17:59 UTC

On Tue, 16 Aug 2022, muta...@gmail.com wrote:

> How does dir /s and xcopy and zip
> manage to descend into subdirectories and
> come out and continue?
>
> Do they make a private copy of the DTA
> structure and restore it?
>
> That contains all the necessary information?

They move the DTA pointer, generally. That's how my implementation does
it:

https://github.com/buricco/doslite/blob/main/cmd/attrib/attrib.c

-uso.

Re: directory recursion

<ab9a1df6-ef2c-4be2-ac42-d8fac6ec7b37n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=632&group=comp.os.msdos.programmer#632

  copy link   Newsgroups: comp.os.msdos.programmer
X-Received: by 2002:a05:620a:4042:b0:6bb:cdb:eef9 with SMTP id i2-20020a05620a404200b006bb0cdbeef9mr10620215qko.498.1660682142597;
Tue, 16 Aug 2022 13:35:42 -0700 (PDT)
X-Received: by 2002:a05:6870:9a22:b0:119:b854:52a1 with SMTP id
fo34-20020a0568709a2200b00119b85452a1mr145585oab.91.1660682140946; Tue, 16
Aug 2022 13:35:40 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border-2.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.msdos.programmer
Date: Tue, 16 Aug 2022 13:35:40 -0700 (PDT)
In-Reply-To: <tdg4s3$1pnp$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=110.54.195.76; posting-account=CeHKkQoAAAAowY1GfiJYG55VVc0s1zaG
NNTP-Posting-Host: 110.54.195.76
References: <ae4343ff-1f95-4e4c-9e5b-09365beb5ac4n@googlegroups.com> <tdg4s3$1pnp$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ab9a1df6-ef2c-4be2-ac42-d8fac6ec7b37n@googlegroups.com>
Subject: Re: directory recursion
From: mutazilah@gmail.com (muta...@gmail.com)
Injection-Date: Tue, 16 Aug 2022 20:35:42 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 65
 by: muta...@gmail.com - Tue, 16 Aug 2022 20:35 UTC

On Tuesday, August 16, 2022 at 9:08:21 PM UTC+8, R.Wieser wrote:
> muta,
> > Do they make a private copy of the DTA
> > structure and restore it?
> That is one way to do it. Another is to create a new DTA record and use
> INT 21h, AH=1Ah to make it the active one
>
> You only need to save the part upto (not included) the (returned)
> file-attribute field (at offset 0x15) though.
> > That contains all the necessary information?
> Yes, AFAIK it does.
>
> By the way, I most always use a function recursion to create the folder
> recursion : when the function encounters a folder I call the function
> itself, but with the path to the just-found folder.
>
> Regards,
> Rudy Wieser

Thanks guys for your responses.

But I don't see how 1a can work.

That requires you to know how big the DTA is, right?

But the DTA could be extended at any time by
a dos vendor to e.g. include a field for long filename.

Which is exactly what was done in pdos.

Or is there another call to retrieve the length of a DTA?

Saving up to 15h seems more robust.

But what is this?

--DOS 2.x and most 3.x---
0Dh WORD entry count within directory
0Fh DWORD pointer to DTA???
13h WORD cluster number of start of parent directory
---PC-DOS 4.01, MS-DOS 3.2/3.3/5.0---
0Dh WORD entry count within directory
0Fh WORD cluster number of start of parent directory
11h 4 BYTEs reserved
--

What is start of parent directory? The directory that contains this file?

Does that mean that msdos keeps going back to the first
directory cluster and then retraverses until it gets
to the required directory entry number?

I assume that is some absolute number
rather than logical, taking into account long filenames.

And with fat32, cluster numbers are 32 bit.

The reserved 4 bytes could have been used for that,
but I don't see any mention of that here:

http://www.ctyme.com/intr/rb-2977.htm

Any thoughts?

Thanks.

Re: directory recursion

<tdi28f$9mo$1@gioia.aioe.org>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=633&group=comp.os.msdos.programmer#633

  copy link   Newsgroups: comp.os.msdos.programmer
Path: i2pn2.org!i2pn.org!aioe.org!XakcSTEO51npqVb7OVl71w.user.46.165.242.75.POSTED!not-for-mail
From: address@not.available (R.Wieser)
Newsgroups: comp.os.msdos.programmer
Subject: Re: directory recursion
Date: Wed, 17 Aug 2022 08:35:40 +0200
Organization: Aioe.org NNTP Server
Lines: 80
Message-ID: <tdi28f$9mo$1@gioia.aioe.org>
References: <ae4343ff-1f95-4e4c-9e5b-09365beb5ac4n@googlegroups.com> <tdg4s3$1pnp$1@gioia.aioe.org> <ab9a1df6-ef2c-4be2-ac42-d8fac6ec7b37n@googlegroups.com>
Injection-Info: gioia.aioe.org; logging-data="9944"; posting-host="XakcSTEO51npqVb7OVl71w.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Notice: Filtered by postfilter v. 0.9.2
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-MSMail-Priority: Normal
X-RFC2646: Format=Flowed; Original
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-Priority: 3
 by: R.Wieser - Wed, 17 Aug 2022 06:35 UTC

Muta,

> But I don't see how 1a can work.
>
> That requires you to know how big the DTA is, right?

Nope. It just sets the pointer to the new DTA

> That requires you to know how big the DTA is, right?

The INT itself knows nothing about sizes. But ask yourself, even if you
would not use the INT, wouldn't you than not still need to know about the
layout (and thus size) of the DTA to be able to use it ? How else would
you be able to grab, for instance, the returned file attributes ?

> Saving up to 15h seems more robust.

Whut ? You've just told us that the DTA can change (in contents and size),
but now you're going to use some fixed size for copying ? :-)

Yes, the DTA /could/ change. But if it does its an *OS* related change.
Well documented..

> But the DTA could be extended at any time by
> a dos vendor to e.g. include a field for long filename.
>
> Which is exactly what was done in pdos.

And that means you have to check the DOS version your program is running
under, and either tell the user that your program only works under version
X, Y and Z, or you need to write the apropriate code for all those versions
and branch to them according to the detected one.

> But what is this?

Do you think we are mindreaders ? I'm from a planet called Earth, and none
of us here can.

Next time tell us where you got the information from please. (you got lucky
that I could match a string to something in "Ralf Browns Interrupt list" and
by it found what you where talking about)

> What is start of parent directory? The directory that contains this file?

Thats data used by the OS to keep track of what it is doing. You can
touch. or (trying to) use it on your own peril. Consider yourself warned.
(tongue in cheek, but I'm serious)

But yes, that sounds about right.

> Does that mean that msdos keeps going back to the first
> directory cluster and then retraverses until it gets
> to the required directory entry number?

Why should it ? All entry records in a directory are of the same size.
IOW, multiply the index of the currently found entry by that size, add the
start sector and you have the last-found entry. No iteration needed. (a bit
simplified, but good enough for the job)

> I assume that is some absolute number
> rather than logical, taking into account long filenames.

Under DOS long filenames are cut up into parts and hidden away into regular
entry records (just with a special marker, similar to how deleted files are
marked), one after the other. The OS just grabs a few entries, takes the
apropriate fields and stich the long filename back together.

> And with fat32, cluster numbers are 32 bit.
>
> The reserved 4 bytes could have been used for that,
> but I don't see any mention of that here:

Than can be because Ralf Brown didn't go beyond the 16-bit DOS versions.
You would need to find yourself the specs for a/that particular 32-bit "DOS"
version to find out.

Regards,
Rudy Wieser

Re: directory recursion

<f9233863-8d46-4cee-b3d9-270459040caan@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=636&group=comp.os.msdos.programmer#636

  copy link   Newsgroups: comp.os.msdos.programmer
X-Received: by 2002:a05:6214:2aa6:b0:474:844b:24ff with SMTP id js6-20020a0562142aa600b00474844b24ffmr1479503qvb.51.1660811067797;
Thu, 18 Aug 2022 01:24:27 -0700 (PDT)
X-Received: by 2002:a05:6830:128b:b0:638:ec79:860 with SMTP id
z11-20020a056830128b00b00638ec790860mr741931otp.241.1660811067511; Thu, 18
Aug 2022 01:24:27 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.msdos.programmer
Date: Thu, 18 Aug 2022 01:24:27 -0700 (PDT)
In-Reply-To: <tdi28f$9mo$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=110.54.141.8; posting-account=CeHKkQoAAAAowY1GfiJYG55VVc0s1zaG
NNTP-Posting-Host: 110.54.141.8
References: <ae4343ff-1f95-4e4c-9e5b-09365beb5ac4n@googlegroups.com>
<tdg4s3$1pnp$1@gioia.aioe.org> <ab9a1df6-ef2c-4be2-ac42-d8fac6ec7b37n@googlegroups.com>
<tdi28f$9mo$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f9233863-8d46-4cee-b3d9-270459040caan@googlegroups.com>
Subject: Re: directory recursion
From: mutazilah@gmail.com (muta...@gmail.com)
Injection-Date: Thu, 18 Aug 2022 08:24:27 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 5054
 by: muta...@gmail.com - Thu, 18 Aug 2022 08:24 UTC

On Wednesday, August 17, 2022 at 2:36:01 PM UTC+8, R.Wieser wrote:
> Muta,
> > But I don't see how 1a can work.
> >
> > That requires you to know how big the DTA is, right?
> Nope. It just sets the pointer to the new DTA
> > That requires you to know how big the DTA is, right?
> The INT itself knows nothing about sizes. But ask yourself, even if you
> would not use the INT, wouldn't you than not still need to know about the
> layout (and thus size) of the DTA to be able to use it ? How else would
> you be able to grab, for instance, the returned file attributes ?

I would need to know the layout as it was at
a particular dos version. Not any new fields, like lfn, that
had been subsequently added.

> > Saving up to 15h seems more robust.
> Whut ? You've just told us that the DTA can change (in contents and size),
> but now you're going to use some fixed size for copying ? :-)

Yes, because existing things wouldn't change.

> Yes, the DTA /could/ change. But if it does its an *OS* related change.
> Well documented..

And as an os vendor taking over where
Microsoft left decades ago, I have documented
an extension.

> > But the DTA could be extended at any time by
> > a dos vendor to e.g. include a field for long filename.
> >
> > Which is exactly what was done in pdos.
> And that means you have to check the DOS version your program is running
> under, and either tell the user that your program only works under version
> X, Y and Z, or you need to write the apropriate code for all those versions
> and branch to them according to the detected one.

The application program can only code what was known
at the time, not what Microsoft or some other os vendor
added as an extension since then.

> > But what is this?
>
> Do you think we are mindreaders ? I'm from a planet called Earth, and none
> of us here can.
>
> Next time tell us where you got the information from please. (you got lucky
> that I could match a string to something in "Ralf Browns Interrupt list" and
> by it found what you where talking about)

I provided the link further down, but yes,
I should have provided it first.

> > What is start of parent directory? The directory that contains this file?
> Thats data used by the OS to keep track of what it is doing. You can
> touch. or (trying to) use it on your own peril. Consider yourself warned.
> (tongue in cheek, but I'm serious)

I am an os vendor. I need to fill in that data.

> But yes, that sounds about right.
> > Does that mean that msdos keeps going back to the first
> > directory cluster and then retraverses until it gets
> > to the required directory entry number?
> Why should it ? All entry records in a directory are of the same size.
> IOW, multiply the index of the currently found entry by that size, add the
> start sector and you have the last-found entry. No iteration needed. (a bit
> simplified, but good enough for the job)

I at least need to chain through the clusters.

> > I assume that is some absolute number
> > rather than logical, taking into account long filenames.
> Under DOS long filenames are cut up into parts and hidden away into regular
> entry records (just with a special marker, similar to how deleted files are
> marked), one after the other. The OS just grabs a few entries, takes the
> apropriate fields and stich the long filename back together.
> > And with fat32, cluster numbers are 32 bit.
> >
> > The reserved 4 bytes could have been used for that,
> > but I don't see any mention of that here:
> Than can be because Ralf Brown didn't go beyond the 16-bit DOS versions.
> You would need to find yourself the specs for a/that particular 32-bit "DOS"
> version to find out.
>
> Regards,
> Rudy Wieser

Re: directory recursion

<tdl306$12f1$1@gioia.aioe.org>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=637&group=comp.os.msdos.programmer#637

  copy link   Newsgroups: comp.os.msdos.programmer
Path: i2pn2.org!i2pn.org!aioe.org!XakcSTEO51npqVb7OVl71w.user.46.165.242.75.POSTED!not-for-mail
From: address@not.available (R.Wieser)
Newsgroups: comp.os.msdos.programmer
Subject: Re: directory recursion
Date: Thu, 18 Aug 2022 12:06:57 +0200
Organization: Aioe.org NNTP Server
Lines: 75
Message-ID: <tdl306$12f1$1@gioia.aioe.org>
References: <ae4343ff-1f95-4e4c-9e5b-09365beb5ac4n@googlegroups.com> <tdg4s3$1pnp$1@gioia.aioe.org> <ab9a1df6-ef2c-4be2-ac42-d8fac6ec7b37n@googlegroups.com> <tdi28f$9mo$1@gioia.aioe.org> <f9233863-8d46-4cee-b3d9-270459040caan@googlegroups.com>
Injection-Info: gioia.aioe.org; logging-data="35297"; posting-host="XakcSTEO51npqVb7OVl71w.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-Notice: Filtered by postfilter v. 0.9.2
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-RFC2646: Format=Flowed; Original
 by: R.Wieser - Thu, 18 Aug 2022 10:06 UTC

Muta,

> I would need to know the layout as it was at a particular dos version.

Exactly. And that is the info that Ralf Browns list tries to offer you.

> Not any new fields, like lfn, that had been subsequently added.

:-) How would you know if the version of DOS you're programming under
isn't one who actually has such extra fields ?

> Yes, because existing things wouldn't change.

I would not bet on that if I where you.

For the record, when you say "added" it normally means that extra fields can
be *inserted* (and/or obsolete fields removed). And that ofcourse means
that the offsets to the fields after it change.

What I mostly do is to first create a test program, and simply try to match
the data/record returned by the tested INT/procedure/etc. with the
information (as in the RBIL) at hand.

>> Yes, the DTA /could/ change. But if it does its an *OS* related change.
>> Well documented..
>
> And as an os vendor taking over where Microsoft left decades ago, I have
> documented an extension.

And that extention is only valid for your particular DOS version. It
could also easily clash with an extension written by someone else ...

> The application program can only code what was known
> at the time, not what Microsoft or some other os vendor
> added as an extension since then.

Quite so. And that means that when you run a program using "what Microsoft
or some other os vendor added as an extension since then" on a "what was
known at the time" version it wil crash-and-burn. Which is why you need
to do version checking.

> I am an os vendor. I need to fill in that data.

*You* need to fill in that data ? In that case its fully up to you to
decide what your DTA is going to look like / what you're going to store in
there. If you want to store the number of the first cluster of the
containing directory in there you can do that. If you don't want to that
you simply do not include that field in your DTA.

Its all upto you, as that part of it is, as I tried to make clear, an
"dragons be here, stay out" area.

On the other hand, if you're just trying to supplement an already existing
framework you should not be looking at the RBIL, but find yourself the specs
for the version of the OS you are trying to, quite literally, add some stuff
to.

On yet another hand, if you're just extending, isn't at least that "parent
cluster" field all filled in yet ?

IOW, its not at all clear to me which level you are operating on.

> I at least need to chain through the clusters.

Yes you would. But every time you want to grab a new entry from that
directory ? Why ?

I could easily imagine just storing the the sector/cluster the currently
returned entry is in. What good would it do me to know where the whole
directory started ? It just creates extra work.

Regards,
Rudy Wieser

Re: directory recursion

<843ee888-f302-48dd-b385-0c8da8551f44n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=638&group=comp.os.msdos.programmer#638

  copy link   Newsgroups: comp.os.msdos.programmer
X-Received: by 2002:a05:6214:2a83:b0:478:5e6a:ebe with SMTP id jr3-20020a0562142a8300b004785e6a0ebemr5365187qvb.130.1660894694985;
Fri, 19 Aug 2022 00:38:14 -0700 (PDT)
X-Received: by 2002:a05:6808:138b:b0:344:a921:9e06 with SMTP id
c11-20020a056808138b00b00344a9219e06mr5201513oiw.272.1660894694753; Fri, 19
Aug 2022 00:38:14 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border-2.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.msdos.programmer
Date: Fri, 19 Aug 2022 00:38:14 -0700 (PDT)
In-Reply-To: <tdl306$12f1$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=110.54.141.8; posting-account=CeHKkQoAAAAowY1GfiJYG55VVc0s1zaG
NNTP-Posting-Host: 110.54.141.8
References: <ae4343ff-1f95-4e4c-9e5b-09365beb5ac4n@googlegroups.com>
<tdg4s3$1pnp$1@gioia.aioe.org> <ab9a1df6-ef2c-4be2-ac42-d8fac6ec7b37n@googlegroups.com>
<tdi28f$9mo$1@gioia.aioe.org> <f9233863-8d46-4cee-b3d9-270459040caan@googlegroups.com>
<tdl306$12f1$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <843ee888-f302-48dd-b385-0c8da8551f44n@googlegroups.com>
Subject: Re: directory recursion
From: mutazilah@gmail.com (muta...@gmail.com)
Injection-Date: Fri, 19 Aug 2022 07:38:14 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 91
 by: muta...@gmail.com - Fri, 19 Aug 2022 07:38 UTC

On Thursday, August 18, 2022 at 6:07:04 PM UTC+8, R.Wieser wrote:
> Muta,
> > I would need to know the layout as it was at a particular dos version.
> Exactly. And that is the info that Ralf Browns list tries to offer you.

Which is useless if there is a newer version of
MSDOS since my program was written, which
operates on a larger DTA.

> > Not any new fields, like lfn, that had been subsequently added.
> :-) How would you know if the version of DOS you're programming under
> isn't one who actually has such extra fields ?

I don't care if it is the os providing a larger DTA.
It is only when I try to second guess MSDOS future
by providing a DTA, as an app, that there is an issue.
I think it should be invalid to provide your own DTA.
You should instead just use what the OS gives you.

> > Yes, because existing things wouldn't change.
> I would not bet on that if I where you.
>
> For the record, when you say "added" it normally means that extra fields can
> be *inserted* (and/or obsolete fields removed). And that ofcourse means
> that the offsets to the fields after it change.
>
> What I mostly do is to first create a test program, and simply try to match
> the data/record returned by the tested INT/procedure/etc. with the
> information (as in the RBIL) at hand.
> >> Yes, the DTA /could/ change. But if it does its an *OS* related change.
> >> Well documented..
> >
> > And as an os vendor taking over where Microsoft left decades ago, I have
> > documented an extension.
> And that extention is only valid for your particular DOS version. It
> could also easily clash with an extension written by someone else ...

Sure. But a standard MSDOS program, that simply
accepts the DTA from MSDOS, will work on either.

> > The application program can only code what was known
> > at the time, not what Microsoft or some other os vendor
> > added as an extension since then.
> Quite so. And that means that when you run a program using "what Microsoft
> or some other os vendor added as an extension since then" on a "what was
> known at the time" version it wil crash-and-burn. Which is why you need
> to do version checking.

You can't do version checking on this as it would
require refusing to run on higher versions in case
Microsoft had extended the DTA.

> > I am an os vendor. I need to fill in that data.
> *You* need to fill in that data ? In that case its fully up to you to
> decide what your DTA is going to look like / what you're going to store in
> there. If you want to store the number of the first cluster of the
> containing directory in there you can do that. If you don't want to that
> you simply do not include that field in your DTA.
>
> Its all upto you, as that part of it is, as I tried to make clear, an
> "dragons be here, stay out" area.
>
> On the other hand, if you're just trying to supplement an already existing
> framework you should not be looking at the RBIL, but find yourself the specs
> for the version of the OS you are trying to, quite literally, add some stuff
> to.
>
> On yet another hand, if you're just extending, isn't at least that "parent
> cluster" field all filled in yet ?

Good question. I had to check what was currently happening.
None of those fields are used currently. Only one active
traversal is supported at the moment and the directory
file handle is stored internally.

I could support multiple traversals by storing the
file handle in the DTA.

> IOW, its not at all clear to me which level you are operating on.

Both levels. Sensible rules for both os and app.

> > I at least need to chain through the clusters.
> Yes you would. But every time you want to grab a new entry from that
> directory ? Why ?
>
> I could easily imagine just storing the the sector/cluster the currently
> returned entry is in. What good would it do me to know where the whole
> directory started ? It just creates extra work.
>
> Regards,
> Rudy Wieser

Re: directory recursion

<tdnr0a$l7r$1@gioia.aioe.org>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=639&group=comp.os.msdos.programmer#639

  copy link   Newsgroups: comp.os.msdos.programmer
Path: i2pn2.org!i2pn.org!aioe.org!XakcSTEO51npqVb7OVl71w.user.46.165.242.75.POSTED!not-for-mail
From: address@not.available (R.Wieser)
Newsgroups: comp.os.msdos.programmer
Subject: Re: directory recursion
Date: Fri, 19 Aug 2022 13:08:46 +0200
Organization: Aioe.org NNTP Server
Lines: 75
Message-ID: <tdnr0a$l7r$1@gioia.aioe.org>
References: <ae4343ff-1f95-4e4c-9e5b-09365beb5ac4n@googlegroups.com> <tdg4s3$1pnp$1@gioia.aioe.org> <ab9a1df6-ef2c-4be2-ac42-d8fac6ec7b37n@googlegroups.com> <tdi28f$9mo$1@gioia.aioe.org> <f9233863-8d46-4cee-b3d9-270459040caan@googlegroups.com> <tdl306$12f1$1@gioia.aioe.org> <843ee888-f302-48dd-b385-0c8da8551f44n@googlegroups.com>
Injection-Info: gioia.aioe.org; logging-data="21755"; posting-host="XakcSTEO51npqVb7OVl71w.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-MSMail-Priority: Normal
X-RFC2646: Format=Flowed; Original
X-Notice: Filtered by postfilter v. 0.9.2
X-Priority: 3
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
 by: R.Wieser - Fri, 19 Aug 2022 11:08 UTC

muta,

>> > I would need to know the layout as it was at a particular dos version.
>> Exactly. And that is the info that Ralf Browns list tries to offer you.
>
> Which is useless if there is a newer version of
> MSDOS since my program was written, which
> operates on a larger DTA.

Your above sentence makes no sense. Somehow you seem to blame Ralf Brown
for not knowing about the DTAs of *future versions* of DOS.

As I already tried to make clear to you, if you run your program on *ANY*
version of DOS, future or past(!), which doesn't use the exact same DTA as
you are using now your program will most likely crash-and-burn. Its as
simple as that.

Hence the need for your program to check for the DOS version its trying to
run on, and abort (with an appropriate message) if you are not sure that the
detected version uses the same DTA as the one you are now writing your
program on.

> I don't care if it is the os providing a larger DTA.
> It is only when I try to second guess MSDOS future
> by providing a DTA, as an app, that there is an issue.

And the above is why you should *not* be trying to second guess it.
Unless you have no problem with having your program crash-and-burn
ofcourse - or worse, as I see you ask for fields in that DTA you should
*not* be touching, possibly trash the data on their drives.

> Sure. But a standard MSDOS program, that simply
> accepts the DTA from MSDOS, will work on either.

As you have still not mentioned anything about what your extension is
supposed to be doing there is no way for me to agree with it.

> You can't do version checking on this as it would
> require refusing to run on higher versions in case
> Microsoft had extended the DTA.

That sentence makes no sense either.

> Good question. I had to check what was currently happening.
> None of those fields are used currently.

How do you know ? Did you already try to just zero those fields out
(and/or put some other values in them) between two requests for the next
directory entry. If not ...

> Only one active traversal is supported at the moment and the
> directory file handle is stored internally.

"internally" ? You mean somewhere else than in the DTA ? Or are you
talking about that "first cluster of the current directory" field you where
talking about earlier ? If so, thats not a handle.

If it *is* a handle and its stored somewhere outside of the DTA, ask
yourself how you can iterate thru two (or more) directories at the same
time.

> I could support multiple traversals by storing the file handle in the DTA.

I've written programs which traversed two directories at a time, it just
used that INT 21h, AH=1Ah a lot. IOW, *all* the data needed to fetch a next
directory entry was-and-is already present in a standard DTA.

> Both levels. Sensible rules for both os and app.

Thats too bad, as I mentioned three ...

Regards,
Rudy Wieser

Re: directory recursion

<2a3cc01f-4ebf-4d51-bf29-402b915731dbn@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=644&group=comp.os.msdos.programmer#644

  copy link   Newsgroups: comp.os.msdos.programmer
X-Received: by 2002:a05:620a:400e:b0:6ba:fcb6:3641 with SMTP id h14-20020a05620a400e00b006bafcb63641mr7710050qko.375.1660992940664;
Sat, 20 Aug 2022 03:55:40 -0700 (PDT)
X-Received: by 2002:aca:adce:0:b0:342:e878:2cc1 with SMTP id
w197-20020acaadce000000b00342e8782cc1mr7482605oie.133.1660992940430; Sat, 20
Aug 2022 03:55:40 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.msdos.programmer
Date: Sat, 20 Aug 2022 03:55:40 -0700 (PDT)
In-Reply-To: <tdnr0a$l7r$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=110.54.141.8; posting-account=CeHKkQoAAAAowY1GfiJYG55VVc0s1zaG
NNTP-Posting-Host: 110.54.141.8
References: <ae4343ff-1f95-4e4c-9e5b-09365beb5ac4n@googlegroups.com>
<tdg4s3$1pnp$1@gioia.aioe.org> <ab9a1df6-ef2c-4be2-ac42-d8fac6ec7b37n@googlegroups.com>
<tdi28f$9mo$1@gioia.aioe.org> <f9233863-8d46-4cee-b3d9-270459040caan@googlegroups.com>
<tdl306$12f1$1@gioia.aioe.org> <843ee888-f302-48dd-b385-0c8da8551f44n@googlegroups.com>
<tdnr0a$l7r$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2a3cc01f-4ebf-4d51-bf29-402b915731dbn@googlegroups.com>
Subject: Re: directory recursion
From: mutazilah@gmail.com (muta...@gmail.com)
Injection-Date: Sat, 20 Aug 2022 10:55:40 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 5304
 by: muta...@gmail.com - Sat, 20 Aug 2022 10:55 UTC

On Friday, August 19, 2022 at 7:09:00 PM UTC+8, R.Wieser wrote:
> muta,
>
> >> > I would need to know the layout as it was at a particular dos version.
> >> Exactly. And that is the info that Ralf Browns list tries to offer you.
> >
> > Which is useless if there is a newer version of
> > MSDOS since my program was written, which
> > operates on a larger DTA.
> Your above sentence makes no sense. Somehow you seem to blame Ralf Brown
> for not knowing about the DTAs of *future versions* of DOS.
>
> As I already tried to make clear to you, if you run your program on *ANY*
> version of DOS, future or past(!), which doesn't use the exact same DTA as
> you are using now your program will most likely crash-and-burn. Its as
> simple as that.

That's not the way to design things.
It should be upwardly compatible.

The os should be free to add new fields.
So long as it doesn't disturb the existing fields,
it should work.

> Hence the need for your program to check for the DOS version its trying to
> run on, and abort (with an appropriate message) if you are not sure that the
> detected version uses the same DTA as the one you are now writing your
> program on.
> > I don't care if it is the os providing a larger DTA.
> > It is only when I try to second guess MSDOS future
> > by providing a DTA, as an app, that there is an issue.
> And the above is why you should *not* be trying to second guess it.
> Unless you have no problem with having your program crash-and-burn
> ofcourse - or worse, as I see you ask for fields in that DTA you should
> *not* be touching, possibly trash the data on their drives.
> > Sure. But a standard MSDOS program, that simply
> > accepts the DTA from MSDOS, will work on either.
> As you have still not mentioned anything about what your extension is
> supposed to be doing there is no way for me to agree with it.

The extension is to return lfn.

> > You can't do version checking on this as it would
> > require refusing to run on higher versions in case
> > Microsoft had extended the DTA.
> That sentence makes no sense either.
> > Good question. I had to check what was currently happening.
> > None of those fields are used currently.
> How do you know ? Did you already try to just zero those fields out
> (and/or put some other values in them) between two requests for the next
> directory entry. If not ...
> > Only one active traversal is supported at the moment and the
> > directory file handle is stored internally.
> "internally" ? You mean somewhere else than in the DTA ? Or are you
> talking about that "first cluster of the current directory" field you where
> talking about earlier ? If so, thats not a handle.
>
> If it *is* a handle and its stored somewhere outside of the DTA, ask
> yourself how you can iterate thru two (or more) directories at the same
> time.

Currently I can't. That's why I posted my original question.
I was looking for a sensible design.

> > I could support multiple traversals by storing the file handle in the DTA.
> I've written programs which traversed two directories at a time, it just
> used that INT 21h, AH=1Ah a lot. IOW, *all* the data needed to fetch a next
> directory entry was-and-is already present in a standard DTA.
> > Both levels. Sensible rules for both os and app.
> Thats too bad, as I mentioned three ...
>
> Regards,
> Rudy Wieser

Anyway, the sensible rules I am thinking
of at the moment are that the app is
required to get the DTA from the os,
it can't provide its own because it
can't know the length of future DTAs.

If an app wants to do a new traversal
it is required to preserve up to 0x15.
The area before 0x15 is at the discretion
of the os.

I use a file handle, subject to change at any
time. MSDOS does whatever it wants
to support fat32 too.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor