Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

NEWDOS/80 source code for reading directory (model 1)

89 views
Skip to first unread message

Knut Roll-Lund

unread,
Feb 20, 2001, 4:41:45 AM2/20/01
to
I am making a utility which needs to read the directory (disk information
and files) similar to the dir command.

I do this for LDOS and DOSPLUS, but would like to support NEWDOS/80 too (as
many dos'es as possible but these three are my choise).

One way of doing this is by actually reading the DIR/SYS file and extract
the information, another way is to use the dos functions for getting the
directory information.

Reading DIR/SYS has it's charm in that it is not different for LDOS and
DOSPLUS. The contents are slightly different though as it would be also for
NEWDOS/80.

NEWDOS/80 won't let me read DIR/SYS even if I supply the password (Password
shouldn't be necessary either since the protection level is not that high).
NEWDOS/80 won't even let me read a copy of DIR/SYS with no protection at
all. This is a feature of NEWDOS/80 since both LDOS and DOSPLUS will read
DIR/SYS of the NEWDOS/80 floppy. It seem

Can anyone help me with this?

Does any of you have a relevant source code example of this? Or a
disassembled dir command?

I also plan to support model III.

Knut Roll-Lund

PS remove 'nospam.' from the reply address


Knut Roll-Lund

unread,
Feb 25, 2001, 5:23:39 PM2/25/01
to
So, I reply to my own post, as the only reply...

I found an example and figured it out.

There were several dir utilities on Ira Goldklang's site and even some
source. Unfortunately there were no directly applicable source that I
could identify but a rater small CAT utility that caught my eye. It was
small and easy to disassemble.

One can read the DIR/SYS file also under NEWDOS/80, one just have to
ignore the 06 error (tried to read locked/deleted record). The data is
there anyway.

BTW I also found out that Misosys C (MC) uses @GET when accessing files
through fread (not @READ which would be more effective especially when the
read size is equal to LRL)

TeloCity

unread,
Mar 7, 2001, 3:38:13 PM3/7/01
to
Take control of the Western Digital controller and read in the track/sector
information to a buffer of your own. Get the directory track information
from the Boot sector tney step the drive to that location and read them in.
Once in the buffer you can do what you want with the data. This would work
across all the Dos's and can be done in either Assembly, faster, or in the
Interpretive Basic mode.

James

"Knut Roll-Lund" <k...@nospam.norcontrol.com> wrote in message
news:tZqk6.3425$X_2....@news1.oke.nextra.no...

Knut Roll-Lund

unread,
Mar 8, 2001, 3:26:41 AM3/8/01
to
Hi James,

TeloCity wrote:
>Take control of the Western Digital controller and read in the track/sector
>information to a buffer of your own. Get the directory track information
>from the Boot sector tney step the drive to that location and read them in.
>Once in the buffer you can do what you want with the data. This would work
>across all the Dos's and can be done in either Assembly, faster, or in the
>Interpretive Basic mode.

I have code for that, for the model I. Since model III uses a different
controller I don't see this as a good solution.

And - I found out how to do it under NEWDOS/80 as I explained in a post to
this thread 25.feb. It now works as long as the dos can figure out the
floppy.

For double density there are incompatibilities between dos'es. I don't like
the 5 sector granules constant of NEWDOS/80.

Nick Andrew

unread,
Mar 8, 2001, 5:19:05 AM3/8/01
to
"Knut Roll-Lund" <k...@nospam.norcontrol.com> writes:

>For double density there are incompatibilities between dos'es. I don't like
>the 5 sector granules constant of NEWDOS/80.

That's tunable, I think. Now that you say it, I vaguely remember doing
something to mine for finer granularity.

Nick.
--
Pacific Internet SP4 http://www.zeta.org.au/~nick/

TeloCity

unread,
Mar 8, 2001, 1:13:40 PM3/8/01
to
When you look at the Boot Sector you are able to determine the OS, version
sector per granule formatting, single vs double density, etc. Given the
ability, under NewDos80 to change the sector formatting under control of the
operator it became a challenge to determine what was there. You could also
move the directory track around to other locations on the disk, as you could
with LDOS but seldom did. Somewhere in my archives I have the source code
books for LDOS, I don't remember the version, and copies of Disk & Other
Mysteries among others. If I locate them I will let you know so they can be
searched for info. One reason I went to VTOS and then LDOS was the
versatility & reliability vs TRSDos, ouch, and NewDos, just too involved,
DosPlus had some features similar to LDOS but not the support in
documentation, etc. I haven't looked at any of this for many years but will
see what I can find.

James
"Knut Roll-Lund" <k...@nospam.norcontrol.com> wrote in message

news:lnHp6.1375$tR1....@news1.oke.nextra.no...

Knut Roll-Lund

unread,
Mar 9, 2001, 4:46:35 AM3/9/01
to
Hello James,

>When you look at the Boot Sector you are able to determine the OS, version
>sector per granule formatting, single vs double density, etc. Given the
>ability, under NewDos80 to change the sector formatting under control of
the
>operator it became a challenge to determine what was there. You could also

Yes, I have though of that, but it would
1. take me even more time to write
2. make the program much bigger
3. I don't know enough about NEWDOS/80

It is not only so that I need to get directory information, I also need to
read and write files on the disk. LDOS, DOSPLUS and NEWDOS/80 are similar
enough in doing reading and writing. The big difference is in the "correct"
way of reading directory information, I think they are all different. I
solve this by reading the DIR/SYS file and extract my own information (which
is quite similar). In this way the configuration can be just about anything
the dos can handle.

I first used Smal-LDOS 5.1.3 which is a subset of LDOS 5.1.3 then when I
bought a double density kit I bought the full DOSPLUS 3.5. So I have
experience both with LDOS and DOSPLUS. The DOSPLUS manual is very good, with
assembly examples for drivers and explains many things in detail. What I
miss the most, from DOSPLUS when I'm using LDOS is the '/' command (repeat
last command). Both LDOS and DOSPLUS have their strong points. Especially
double density is more integrated directly into DOSPLUS no need for SOLE or
QFB, the FORMAT and BACKUP commands handle these things directly. On model I
you automatically get single density track 0 when creating a boot disk.

I also have "Machine Language Disk I/O and other Mysteries". It is a very
good book although it refers to things in TRSDOS. We should get it scanned.
I have started OCR'ing the DOSPLUS manual (hope that I'm not doing double
work) maybe I'll get around to doing Disk I/O too sometime. I do have some
of the examples from Disk I/O on file.

Source code books for LDOS would be very interesting. I have downloaded the
LS-DOS 6.2 source just for reference (model I is my machine)

To spill the beans.. The utility I'm making is a transfer utility for David
Keil's emulator which will have split screen directory display of the TRS-80
and PC side (much like norton commander). I hope it will be a nifty way of
transferring files on and off the emulator. I have been able to make it
quite fast, with climbing in directories on the pc side and all. Now I have
a problem with opening files on the PC side - no such file error, and will
have to do some debugging to find out why. I'm writing in MC with lots of
inline assembly.

TeloCity

unread,
Mar 9, 2001, 4:00:45 PM3/9/01
to
You are in the assembly area now and I never had the need to go there with
the Tandy so stayed with the Basic. When I did need assembly modules I had
a friend who ate, drank and slept assembly code. I would write the hex
basic on the media and he would write the assembly directly as well. At the
time we had all the memory handling points of LDOS in our memories and knew
where it all would go and do. Now... Let's just say a lot of water has
gone under the bridge. If I can locate the source code for LDOS and any of
the other books I used at the time I will post a note here. Since my wife
will testify that I never throw any of this away it will be in the back
ground somewhere the trick is locating that where.

James

"Knut Roll-Lund" <k...@nospam.norcontrol.com> wrote in message

news:iE1q6.1942$tR1....@news1.oke.nextra.no...

Tim Mann

unread,
Mar 9, 2001, 4:45:22 PM3/9/01
to
Knut Roll-Lund <k...@nospam.norcontrol.com> wrote:
> Source code books for LDOS would be very interesting. I have downloaded the
> LS-DOS 6.2 source just for reference (model I is my machine)

There were no source code books for Model I/III LDOS 5; James must have been
referring to "The Source", which contains the LS-DOS 6.2 source code that
you already have. Actually, what you downloaded presumably was the
reconstructed LS-DOS 6.3.1 source code, either Frank Durda's version or
Pete Cervasio's. Both of those are better than "The Source"; they're
for a later version of the system, they're in online, searchable format,
and you can even modify and recompile the system if you want.

The only thing in "The Source" that's not on-line anywhere right now is
a few pages worth of introductory paragraphs that are scattered through
volumes 2 and 3. (The intro paragraphs from volume 1 were typed in by
Doug Beattie and are on my web site.) There's little or nothing of
interest in them; the commentary that Frank added to his version says more.

The source code for Model I/III LDOS 5 seems to have been lost. A collector
got Roy Soltoff to send him his entire archive of TRS-80 floppy disks a
couple of years ago, then (as far as I can tell) disappeared from the face
of the earth about a year later without having made any of the data available
to anyone else.

--
Tim Mann tim....@compaq.com http://www.tim-mann.org
Compaq Computer Corporation, Systems Research Center, Palo Alto, CA

Nick Andrew

unread,
Mar 10, 2001, 5:31:23 AM3/10/01
to
Tim Mann <tim....@compaq.com> writes:

>The source code for Model I/III LDOS 5 seems to have been lost. A collector
>got Roy Soltoff to send him his entire archive of TRS-80 floppy disks a
>couple of years ago, then (as far as I can tell) disappeared from the face
>of the earth about a year later without having made any of the data available
>to anyone else.

That's a shame. Dontcha just hate it when people promise things and
then piss off.

I was always impressed by LDOS's advanced design (never so impressed
though to switch from NEWDOS/80 cause Newdos seemed to run a lot faster
than LDOS).

The loss of the source code is not fatal though, it's not too hard to
disassemble these small programs; they were written in assembly anyway.
I've disassembled (and produced commented source code files) for the
main modules of NEWDOS/80. Perchance they will become available on
Ira's software archive soon.

0 new messages