DOS extender

Developed in the 1980s to cope with the memory limitations of MS-DOS and its derivatives, DOS extenders are programs which enable software to run under the protected mode environment initially introduced with the Intel 80286 processor and later expanded upon with the Intel 80386, even though the host operating system is only capable of operating in real mode.
DOS extender operation
A DOS extender is a program that "extends" DOS so that programs running in protected mode can transparently interface with the underlying MS-DOS API. This was necessary because many of the functions provided by DOS require 16-bit segment and offset addresses pointing to memory locations within the first 640 kilobytes of memory. Protected mode, however, uses an incompatible addressing method where the segment registers (now called selectors) are used to point to an entry in the Global Descriptor Table which describes the characteristics of the segment. The two methods of addressing are mutually exclusive, with the processor having to make costly switches to real (or V86) mode to service non-protected mode requests.
In addition to setting up the environment and loading the actual program to be executed, the DOS extender also provides (amongst other things) a translation layer that maintains buffers allocated below the 1MB real mode memory barrier. These buffers are used to transfer data between the underlying real mode operating system and the protected mode program. Since switching between real/V86 mode and protected mode is a relatively time consuming operation, the extender attempts to minimize the number of switches by duplicating the functionality of many real mode operations within its own protected mode environment. As DOS uses interrupts extensively for communication between the operating system and user level software, DOS extenders intercept many of the common hardware (e.g. the real-time clock and keyboard controller) and software (e.g. DOS itself and the mouse API) interrupts. Some extenders also handle other common interrupt functions, such as video BIOS routines.
Essentially, a DOS extender is like a miniature operating system, handling much of the functionality of the underlying operating system itself.
Development history

The DOS extender was arguably invented by Phar Lap, but it was Tenberry Software, Inc.'s (formerly Rational Systems) 386 extender DOS/4GW that brought protected mode DOS programs to the masses. Included with Watcom's C, C++ and Fortran compilers for 386 class processors, it soon became a ubiquitous mainstay of PC applications and games such as id Software's successful DOOM.
While initially it was the memory hungry business applications that drove the development of DOS extenders, it would be PC games that truly brought them into the spotlight. As a result of the development of DOS extenders, two new software interfaces were created to take care of the many potential conflicts that could arise from the varied methods of memory management that already existed, as well as provide a uniform interface for client programs.
The first of these interfaces was the Virtual Control Program Interface (VCPI), but this was rapidly overshadowed by the DOS Protected Mode Interface (DPMI) specification, which grew from the Windows 3.0 development. [1] They provided an API through which an extended program could interface with real mode software, allocate memory, and handle interrupt services. They also provided an easy method for the extender to set up the switch to protected mode, and allowed multiple protected mode programs to coexist peacefully.
DOS extenders
- DOS/4G and DOS/4GW and DOS/16M by Tenberry Software, Inc.
- 286|DOS Extender and 386|DOS Extender by Phar Lap
- PROT by Al Williams, a 32-bit DOS extender published in Dr. Dobb's Journal[2][3] and in two books.[4][5] This extender had the virtue of running DOS and BIOS calls in emulated mode instead of switching back to real mode.
- CauseWay by Devore Software & Consulting, a 32-bit DOS extender
- PMODE and PMODE/W by Thomas Pytel and Charles Sheffold. The latter was for Watcom C as an alternative to DOS/4GW, and was quite popular with demoscene programmers
- DOS/32 Advanced by Narech Kontcell, an open source DOS extender that can be used as an alternative to DOS/4GW
- Wuschel's DOS eXtender (WDOSX) by Michael Tippach
- Ergo (formerly Eclipse, formerly A. I. Architects) OS/286 and OS/386 extenders, and DPM16 and DPM32 servers
- Microsoft Windows (DOS based versions) included both a DPMI server and DOS extender.[6]
- HX DOS Extender provides limited Win32 support
- DosWin32 provides limited Win32 support
- X-32 by Doug Huffman, a DOS extender
- CWSDPMI by Charles W. Sandmann, a DPMI server for use with 32-bit protected mode DOS DJGPP programs
- GO32, used in older (pre-v2) versions of DJGPP, and Free Pascal
- DBOS by Salford Software, a 32-bit protected mode DOS extender used primarily by their FTN77 (Fortran Compiler)
- MOSS extender based on the Flux OS toolkit
Notable DOS extended applications
- Adobe Acrobat Reader 1.0 (uses an early version of DOS/4GW professional)
- AutoCAD 11 (PharLap 386)
- Lotus 1-2-3 Release 3
- Oracle Professional
- IBM Interleaf
- Major BBS, a 1980s BBS software package that utilized the Phar Lap DOS extender.
- Quarterdeck DESQview and DESQview/X multitasking software
- Watcom's C, C++ and Fortran compilers for the X86
- Countless DOS games from the early to mid 1990s, mostly using DOS/4GW, including:
- id Software's DOOM and its sequels, as well as Quake (built with DJGPP)
- Looking Glass Studios' System Shock,
- Parallax Software's Descent
- Crack dot com's Abuse
- Blizzard Entertainment's Warcraft: Orcs & Humans and Warcraft II: Tides of Darkness
- 3D Realms' Duke Nukem 3D
- Midway's Mortal Kombat
- Westwood Studios' Command & Conquer and Command & Conquer: Red Alert
References
- ^ Duncan, Ray (1992). Extending DOS: A Programmer's Guide to Protected-Mode DOS (2nd ed. ed.). Addison-Wesley. pp. 433–462. ISBN 0-201-56798-9.
{{cite book}}
:|edition=
has extra text (help) - ^ Williams, Al (1990). "Roll your own DOS extender: Part I". Dr. Dobb's Journal. 15 (10). CMP Technology: 16–18, 20, 24. ISSN 1044-789X.
{{cite journal}}
: Unknown parameter|month=
ignored (help) - ^ Williams, Al (1990). "Roll Your Own DOS Extender: Part II". Dr. Dobb's Journal. 15 (11). CMP Technology: 74, 76, 80, 81–83, 85, 122–128, 130. ISSN 1044-789X.
{{cite journal}}
: Unknown parameter|month=
ignored (help) - ^ Williams, Al (1991). DOS 5 A Developer's Guide. MT Books. ISBN 1558511776.
- ^ Williams, Al (1993). DOS 6 A Developer's Guide. MT Books. ISBN 1558513094.
- ^ Williams, Al (1993). DOS and Windows Protected Mode: Programming with DOS Extenders in C. Addison-Wesley. p. 30. ISBN 0-201-63218-7.
External links
- DOS Extender on the FreeDOS wiki
- The Free Country's list of DOS extenders
- DOS extenders
- Tenberry Software, Inc. Makers of DOS/4G extender
- X-32 DOS extender
- Roll Your Own DOS Extender, Part II Al Williams' PROT extender (Part I appears to not be online)
- Devore Software & Consulting Makers of the Causeway extender
- DOS/32 Advanced (DOS/32A)
- WDOSX Wuschel's DOS eXtender
- Japheth's HX Dos extender Site Home of the HX DOS extender
- Compilers
- OpenWatcom multi-platform C, C++ and Fortran compilers
- Free Pascal multi-platform Pascal and Object Pascal compiler
- CC386 David Lindauer's 32-bit C compiler for DOS and WIndows
- Digital Mars C compiler
- DJ Delorie's site DOS extended port of the GNU Compiler Collection and associated programs