Article View: comp.sys.ibm.pc.programmer
Article #911Re: .SYS (device drivers) that are actually .EXEs?
From: walt dixon
Date: Tue, 10 Jul 1990 11:50
Date: Tue, 10 Jul 1990 11:50
33 lines
2170 bytes
2170 bytes
In <143@qmsseq.imagen.com> Jeff Pipkins writes:
[initial text deleted]
>Character devices have a name field. For block devices, the first byte
>of this is used instead to tell how many units it supports. By going
>through the device driver chain and counting these, you should be able
>to determine the drive letters associated with that driver.
Despite what some documentation says, this field is never used. DOS
looks only at the unit count returned in the init request header.
>Note that
>if you inserted your driver anywhere but at the end of the chain, you
>would change the drive letters of the drives supported by the other
>drivers. That would cause problems for using a technique like the one
>you have just described.
This is not true. DOS maitains a data structure refered to as the
current directory structure (CDS). This structure is a contiguous
array of entries for each drive; its size is set by the LASTDRIVE
statement (or its default value). The first entry corresponds to
drive A:, etc. In addition to status (joined, etc), and then current
directory, each entry condains a pointer to the Device Control Block
(DCB) for the device which in turn points to the Device Header. Any
relationship between drive letter and position in the driver chain is
merely a conincedence.
Walt Dixon {internet: dixon@crd.ge.com }
{us mail: ge crd }
{ po box 8 }
{ schenectady, ny 12301 }
{phone: 518-387-5798 (W) }
{ 518-875-6203 (H) }
Walt Dixon dixon@crd.ge.com
Technical Details
Message-ID:
<9542@crdgw1.crd.ge.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!rpi!crdgw1!sagittarius!dixonReferences:
<j8t1seef8@tmsoft.uucp> <141@qmsseq.imagen.com> <552@csource.oz.au> <142@qmsseq.imagen.com> <90187.102930TOMIII@MTUS5.BITNET> <143@qmsseq.imagen.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!rpi!crdgw1!sagittarius!dixon From: dixon@sagittarius.crd.ge.com (walt dixon) Newsgroups: comp.sys.ibm.pc.programmer Subject: Re: .SYS (device drivers) that are actually .EXEs? Message-ID: <9542@crdgw1.crd.ge.com> Date: 10 Jul 90 11:50:20 GMT References: <j8t1seef8@tmsoft.uucp> <141@qmsseq.imagen.com> <552@csource.oz.au> <142@qmsseq.imagen.com> <90187.102930TOMIII@MTUS5.BITNET> <143@qmsseq.imagen.com> Sender: news@crdgw1.crd.ge.com Reply-To: dixon@sagittarius.crd.ge.com (walt dixon) Organization: General Electric Corp. R&D, Schenectady, NY Lines: 33