Jump to content

DOS extender

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 212.23.126.20 (talk) at 11:23, 2 September 2006. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Invented in the 1980s to cope with the memory limitations of the Microsoft Disk Operating System (MS-DOS) and its derivatives, DOS extenders were programs which enabled other software to run under the protected mode environment initially introduced with the Intel 80286 processor, and later expanded on with the Intel 80386.

With the advent of Microsoft Windows 95, the DOS extender has gradually become a thing of the past, 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 has finally shed the few remaining vestiges of MS-DOS that remained in their consumer operating systems and DOS extenders, once a hot technology, became a minority product. Nevertheless, a few DOS extenders continued developing after Windows 95 and even XP release, especially DOS/32A and HX DOS Extender. Most XP users do not know anything about them, but are occasionally happy to have DOS based partitioning, recovery or similar products, partially faking the "Win" look, and based on DOS extenders of course.

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 1MB 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 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. They were, for the most part, compatible with the existing standards of memory expansion, extended memory and expanded memory, relying on these to provide the actual memory before taking over (thus ensuring that no previously allocated memory was overwritten).

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. With the 80386 processor and an appropriate extender, programs could theoretically access up to 4 gigabytes of memory, although in practice this figure was usually much smaller. Most DOS extenders did not provide access to virtual memory, limiting the application to however much physical memory was installed in the machine.

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 under a generous royalty and redistribution fee free license, it soon became an ubiquitous mainstay of PC games, beginning with id Software's massively successful game Doom.

Other famous DOS extended applications included Autocad 11 and Microsoft Windows, starting from the Windows/386 variant of Windows 2.x (Windows/286 2.1 was not a DOS extender, it just made use of the High Memory Area and of expanded memory). The first 16-bit DOS extender in the Windows series was Windows 3.0 when running in "standard" mode. In the "386 enhanced" mode, the kernel and VxDs were 32-bit, but the applications were 16-bit protected mode, giving a hybrid nature to the system.

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.

Notable DOS extenders

Notable DOS extended applications

References

  1. ^ Duncan, Ray (1992). Extending DOS: A Programmer's Guide to Protected-Mode DOS (2nd ed. ed.). Addison-Wesley. pp. pp. 433-462. ISBN 0-201-56798-9. {{cite book}}: |edition= has extra text (help); |pages= has extra text (help)
  2. ^ Williams, Al (1993). DOS and Windows Protected Mode: Programming with DOS Extenders in C. Addison-Wesley. pp. pp. 30. ISBN 0-201-63218-7. {{cite book}}: |pages= has extra text (help)