Undocumented DOS: A Programmer's Guide to Reserved MS-DOS Functions and Data Structures. (book reviews)
by Tom Campbell
An instant classic, Undocumented DOS explains DOS calls that Microsoft and IBM mark--infuriatingly--as "reserved" in their technical reference manuals. Well written by a team with impeccable credentials (including the original author of MS-DOS), this book/disk combination belongs on every serious programmer's shelf.
The book gives you everything you need to know to write TSRs, network code, alternate command processors, debuggers, and other high-performance software. The source code is largely in C, with dollops of assembly and Turbo Pascal. Luckily, Undocumented DOS explains using these calls.
Emphatically not a rehash of IBM or Microsoft technical documentation, Undocumented DOS also emphasizes complete programs, providing source code for utilities that not only teach but stand as useful programs on their own. Examples include a program that lets you load and remove device drivers from the command line; a simple RAM disk, also loadable from the command line; a program that lets you hid disk volumes, making them invisible to DOS; and a utility that lets you rename files using wildcard specifications across directories (something that DOS won't let you do).
Learning anything well requires that you make connections between seemingly disparate ideas. Undocumented DOS is written by experts at such a Nirvana-like plane that they're able to make those connections for you. For example, the section on the network redirector, normally though of as a way to create CD-ROM and network drivers, correctly points out that the network redirector can be used to graft any alien file system onto DOS, making it look like any other device. Another telling passage about version-specific DOS utilities remarks that "it is almost never necessary to patch DOS or the DOS utilities." Considering the huge number of DOS patches available on bulletin boards and in magazine articles, one might wonder if the authors haven't made a mistake. But sure enough, a program follows that lets you fool DOS into thinking it's a different version (without patching DOS).
The software, on two 1.2MB floppies, includes a hypertext reference guide, TSR template programs, and some great utility programs. One of them is an interrupt monitor program that has a full scripting language with replaceable parameters (like those in batch files) and access to the CPU registers. The hypertext guide (ironically, not a TSR) is itself worth the price of the book. Even though the guide itself takes up well over a megabyte of disk space, I'd like to see it with example code, even in fragmentary form, and as a swappable TSR. The insights that this code could provide would be well worth an extra disk to dedicated programmers.
While other books, including Microsoft's own MS-DOS Encyclopedia, have touched on a few of the issues covered by Undocumented DOCS, none of them have even approached its scope. If you need to write code that DOS Technical Reference says you can't write, buy this book and code the impossible.