Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!hplabs!hp-pcd!hpcvlx!everett From: everett@hpcvlx.HP.COM (Everett Kaser) Newsgroups: comp.sys.ibm.pc Subject: Re: Have Loadable Drivers Been Extended Since DOS 2.11? Message-ID: <101000057@hpcvlx.HP.COM> Date: 20 Jul 89 15:03:02 GMT References: <112@isgtecXE12JC\> Organization: Hewlett-Packard Co., Corvallis, OR, USA Lines: 38 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