[comp.sys.ibm.pc] Have Loadable Drivers Been Extended Since DOS 2.11?

bmw@isgtec.UUCP (Bruce Walker) (07/18/89)

I have been writing an MSDOS character-type loadable driver based on
the old MSDOS 2.11 manual section on "Writing Device Drivers".  This
driver properly requires an "open" and "close" call, which MSDOS 2.11
drivers don't support.

Just from curiosity, I dissassembled a driver that I had kicking
around, and I discovered that the driver header bit-word had an
"undocumented" bit set (bit 11).  I then discovered that the "command
decoder" part of the driver jumped on command numbers 13 and 14.
My 2.11 docs only list valid commands from 0 through 12.

Could this "new bit" mean "Extended Post-DOS 2.11 Driver"?

Could these extra commands be "open" and "close"?

Would someone please tell me:
1. whether my guesses are near the mark?
2. how to parse these extended commands

and/or:
3. what available docs could give me the answers to 1. and 2. above.

Thanks.
-- 
Bruce Walker                   ...uunet!mnetor!lsuc!isgtec!mutant!bmw
"Better Living Through Connectivity"  ...utzoo!lsuc!isgtec!mutant!bmw
ISG Technologies Inc. 3030 Orlando Dr. Mississauga. Ont. Can. L4V 1S8

everett@hpcvlx.HP.COM (Everett Kaser) (07/20/89)

 bmw@isgtecXE12JC\ (Bruce Walker) writes...
>I have been writing an MSDO+ character-type loadable driver based on
>the old MSDOS 2.11 manual section on 9]@riting Device Drivers".  This
>driver properly requires an "open" and "close" call, which MSDO+ 2.11
>drivers don't support.

>Just from curiosity, I dissassembled a driver that I had kicking
>around, and I discovered that the driver header bit-word had an
>"undocumented" bit set (bit 11'SR  I then discovered that the "command
>decoder" part of the driver jumped on command numbers \G'] and 14.
>Ay 2.11 docs only list valid commands from 0 through 12.

>Could this "new bit" mean "Extended Post-DOS 2.11 Driver"?

>Could these extra commands be "open" and "close"?

>Bruce Walker                   ...uunet!mnetor!lsuc!isgtec!mutant!bmw

An excellent source for the answers to these and MANY other questions about
device drivers is the book "Writing MS-DOS Device Drivers" by Robert S. Lai,
The Waite Group, published by Addison-Wesley, ISBN 0-201-13185-4, $24.95 (US).

Starting on page 338 is a full description of the attribute word and it's use
by both character and block device drivers.  For character drivers, bit 11
means: 0=OPEN/CLOSE not supported, 1= OPEN/CLOSE supported (DOS 3.0 and above).
For block drivers, 0=REMOVABLE MEDIA not supported, 1=REMOVABLE MEDIA
supported.  Also added at 3.0 was a definition for bit 13 for character devices
which is 1=Output Til Busy command available for character devices.  At 3.2,
they added a couple of more commands for block devices (with some spares in
between) and command numbers can now be from 0 to 24.  And yes, commands 13
and 14 are DEV_OPEN and DEV_CLOSE, respectively.

If you're writing a device driver, get the book, it's worth the investment.

Everett Kaser                   "Your thoughts create your reality."
!hplabs!hp-pcd!everett
everett%hpcvlx@hplabs.hp.com