<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Thu, 23 May 1985 10:35:34 PDT (Thursday)
From   : Bicer.OsbuSouth@XEROX.ARPA
Subject: Re: need directory information

     I am trying to write a program similar to xdir for my cpm 
computer.  I need some information on how to access the directory
tracks on the disk.  Also, how do I use the disk parameter block
to find disk usage information?  I will be writing the program in
C (Software Toolworks c-80).  Any helpful information would be
greatly appreciated.


The easiest and most portable way that I know of, is to set up a
fully ambiguous FCB (all ?'s), and do a BDOS search for FIRST,
look at the directory entry at the default DMA buffer (i.e 80H),
then continue doing BDOS search for NEXT and examining the directory 
entry, until the function returns no more matches (i.e. all the file
names on the disk in the current user area have been shown).

       1 - Set up fully ambiguous FCB (all ?'s)
       2 - BDOS search for FIRST
       3 - If no match found, DONE
       4 - Examine the directory entry, update internal data
       5 - BDOS search for NEXT
       6 - If no match found, DONE
       7 - GOTO Step 4

One of the best documents I know which explains the directory entries
is the DU (Disk Utility) documentation. This program is in public
domain, and I would recommend you learn how to use it and understand 
the information it provides, before you start the project.

Good luck.

       Jack Bicer
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>