Dos Extender Article Index for
Dos
Website Links For
Dos
 

Information About

Dos Extender





DOS EXTENDER OPERATION

Strictly speaking, a DOS extender is a program that does exactly what its name implies: it "extends" DOS so that programs running in protected mode can transparently access the API of the operating system. This was necessary because a great many of the functions provided by DOS required 16-bit segment and offset addresses pointing to memory locations within the first megabyte of memory. Protected mode, however, uses an incompatible addressing method where the segment registers (now called selectors) actually point to an entry in a table which describes the segment. The two methods of addressing are mutually exclusive.

In addition to setting up the environment and loading the actual program to be executed, the DOS extender also provided (amongst other things) a translation layer that maintained Buffers allocated below the 1 MB real mode memory barrier. These buffers were used to shuffle data back and forth between the underlying real mode operating system and the protected mode program. Switching between real (or V86) mode and protected mode was a very time consuming operation, so the extender attempted to minimize the number of switches by providing as much functionality as it could from within the protected mode environment.

DOS extenders also handled Interrupts generated both in hardware and software. The DOS API is in fact nothing more than a collection of software generated interrupts. Peripheral devices such as the real-time clock and keyboard controller are examples of hardware interrupt generating devices. Since the interrupt handlers of MS-DOS function in real (or v86) mode, the extenders also had to deal with them, either by simulating them from within protected mode, or passing them down to their real mode handlers. Most extenders also extended many of the other common interrupt functions, notably the video BIOS routines and mouse software interface.

In essence, a DOS extender functioned very much like a miniature operating system. It is, for the most part, compatible with the existing standards of memory expansion, Extended Memory and Expanded Memory , cooperating with HIMEM and EMM386 if present, relying on these to provide the actual memory before taking over (thus ensuring that no previously allocated memory was overwritten). A good extender works well in all possible memory management situations (EMM386 present, HIMEM present but no EMM386, or no memory manager), but there were also versions for those this was not true (some Borland's extenders did require HIMEM to work).

The initial extenders for the 16-bit protected mode available on the 80286 processor allowed software to access up to 16 megabytes of memory at a time, due to the 16-bit segment length limit of descriptors. With the 80386 processor, the segment length limit was increased to 20 bits, with an additional bit in the descriptor entry to specify the granularity of the segment limit value as either bytes or 4 kilobyte pages, allowing the extender to theoretically access up to 4 gigabytes of memory, although in practice this figure was usually much smaller, and many older extenders had limitations of 16, 32 or 64 MB (even Windows 3.0, when used as a DOS extender, were limited to 16 MB memory, and relied on the Windows 3.0 version of HIMEM.SYS to enforce this limitation in standard mode. Windows 3.1 increased the limit to 256 MB memory and that limitation were because of the limited number of descriptor table entries, which allowed Windows 95, because of it's flat address space, to increase the limitations to 480 MB, then a limitation of the VMM were hit for which increasing allowed Windows to support more memory, but increased the memory required to initialize the VMM, so obviously it became a tradeoff. Windows 98 required more memory anyway, so Microsoft decided in increase the limitation, allowing it to support 1 GB of memory as long as VCACHE's address space were limited to 512 MB by adding this setting to the section: maxfilecache=524288. See [http://blogs.msdn.com/oldnewthing/archive/2003/08/14/54640.aspx for details.) New extenders however, have higher or no limits (all 4 GB supported). Some DOS extenders do not provide access to Virtual Memory , limiting the application to memory installed in the machine, some of them do.


DEVELOPMENT HISTORY

The DOS extender was arguably invented by Phar Lap , but it was Tenberry Software, Inc's (formerly Rational Systems) DOS/4GW extender that brought protected mode DOS programs to the masses. Included with Watcom 's popular C compiler, it soon became an ubiquitous mainstay of PC games, beginning with Id Software 's massively successful game Doom . Another famous DOS-extended application of that time was Autocad 11.

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, with Rational Systems DOS/4GW taking the crown. Along with the DOS extenders themselves, two other software interfaces were created to take care of the many potential conflicts that could arise and provide a uniform interface for client programs. Initially there was the Virtual Control Program Interface , but this was rapidly overshadowed by the DOS Protected Mode Interface Specification , which grew from the Windows 3.x 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.


OBSOLESCENCE


With release of Microsoft Windows 95, the DOS extender popularity began to decline, with Windows providing much of the same functionality that drove people to create DOS extenders in the first place (the ever increasing memory requirements of modern software). With the release of Windows XP which based on Windows NT rather than on Windows 95, Microsoft finally shed the few remaining vestiges of MS-DOS that remained in their consumer operating systems. DOS extenders, once a hot technology, became a minority product. Nevertheless, a few DOS extenders continued development after the release of Windows 95 and Windows XP, especially DOS/32A and HX DOS Extender, providing also some Windows "emulation" - allows to run some Windows software in DOS.


NOTABLE DOS EXTENDERS