Export (0) Print
Expand All
Windows Confidential Remind Me Never to Do That Again
Raymond Chen


There's an old tool for the Windows® 95 series of operating systems that's known the as Automatic Skip Driver. Your first reaction to the tool may have been to its clumsy name, and you may even have suspected that the letters ASD started out meaning something else. And you'd have been exactly right.
Windows 95 had to deal with a lot of non-Plug and Play devices because the vast majority of systems out there at the time predated the Plug and Play specification. Hardware detection in the absence of proper Plug and Play devices was a very scary undertaking.
For example, modem detection was accomplished by issuing queries for the values of dozens of modem registers. Although there was a fairly well-established basic modem command set, there was significant variation in the implementation of the darker corners of the command language. Not surprisingly, this inconsistency was frustrating for communications programs, since it required adding special cases for various modem models to accommodate their individual quirks; however, the inconsistency was an accidental boon for Windows: since each modem behaved subtly differently, Windows could investigate those dark corners and compare the modem's behavior against a table of known modems and their responses.
  
There was one person on the Windows 95 team whose job was to install what felt like every modem known to mankind and run a little program that put the modem through its paces, explored the dark corners, and collected the results from each one so that an exhaustive modem database could be built up. If you still have access to a machine running Windows 95, you can take a peek into the Windows\Inf directory and look at all those files whose names begin with MDM. There's over a megabyte of device information files devoted to modems. That's a few years worth of somebody's life collapsed into a megabyte of unreadable hex numbers.
Detecting modems was pretty safe, since nearly all modems behaved roughly the same at a high level; all the excitement was in the details. Much scarier were the devices that used I/O ports. For example, to detect whether a specific video card was installed, the Windows 95 Configuration Manager's video card detection module would send carefully selected values out specific I/O ports and listen for any responses from the device. If the device responded in just the right way, then it assumed it found what it was looking for. If not, then it moved on to the next video card model.
Of course, if the device installed on that I/O port was not the video card that Configuration Manager was testing for, it might get very upset that somebody sent it values that made no sense. Depending on how petulant the device was, it might hang or reboot the machine. This did not bode well for the Configuration Manager. Thus was born the module known as ASD.
Before performing these potentially catastrophic hardware probes, the Configuration Manager created a file that said, basically, "Oh no! I'm about to do dangerous thing X!" This was the computer version of the classic "Open in the event of my death" envelope that the hero of an action movie leaves with his girlfriend before he goes off on a suicide mission to fight the bad guy.
If dangerous thing X did, in fact, cause the computer to hang or crash or reboot, then the next time the system started up, it saw this magic file and "opened the envelope" to see that it was dangerous thing X that caused the computer to crash. The system then concluded that the attempt to detect device X was catastrophic and knew not to do that ever again!
The module that did this work was named ASD. The letters ASD stood for "Attempting Something Dangerous."

Raymond Chen's Web site, The Old New Thing, and identically titled book (Addison-Wesley, 2007) deal with Windows history and Win32 programming. He is careful because the plate is very hot.
© 2008 Microsoft Corporation and CMP Media, LLC. All rights reserved; reproduction in part or in whole without permission is prohibited.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft