PMODE
From Wikipedia, the free encyclopedia
PMODE is a DOS extender used in several IBM PC compatible DOS applications in the mid and late 1990s. It was created by Thomas "Tran" Pytel, and the first version became publicly available in 1994. The original PMODE was written to be used with programs written in x86 assembler, specifically using Borland's TASM. It was later expanded for use as a drop-in replacement for DOS/4GW under the name PMODE/W.
PMODE was released with the source code included in the distribution archive, with the only restrictions on its use being that it could not be sold for profit, nor used as the kernel of an extender to be sold for profit. Older releases also requested that the original authors be credited in the product.
The source code to PMODE/W was never made available to the public, although the extender could be used without restriction in free software, once again with a request that the authors were credited in the product. Commercial and shareware releases using PMODE/W required that a license be purchased. The cost at the time of PMODE/W v1.33's release (1996) was USD $500, although university students could purchase a license at the discounted price of USD $100.
As of 2002, PMODE/W may now be freely used in commercial software, provided the software is not itself a DOS extender.
Contents |
[edit] Features
Like other DOS extenders, PMODE was used to create DOS applications that run under the 32-bit protected mode rather than the 16-bit real mode that was native to DOS. In particular, this removed a lot of complications in memory addressing, making it possible to use the flat memory model and to easily overcome the 640-kibibyte memory limit inherent to DOS.
A major difference between PMODE/W and other popular extenders was its small footprint, increasing the size of the standalone executable by less than 10 kilobytes even before applying executable compression. PMODE was therefore useful in small programs where the compactness of the final distribution version was a concern. Other major concerns in the development were speed and stability.
PMODE/W, unlike most DOS extenders, was bound directly to the protected mode program. Other extenders, such as DOS/4GW, required that a small real mode program (called a stub) was attached to the beginning of the protected mode executable. The stub located and loaded the DOS extender, which was provided as a separate executable, and the extender would then in turn load the protected mode portion of the program and begin execution.
PMODE conforms to a subset of the DOS Protected Mode Interface (DPMI) specification version 0.9. It is also compatible with the earlier VCPI and XMS specifications. PMODE programs can therefore be run from Windows as well as under various DOS memory configurations. However, the limited DPMI implementation caused some compatibility problems, and there was no support for virtual memory either.
PMODE was entirely written in x86 assembly language.
[edit] Derived versions
PMODE/W is a version of PMODE for the Watcom C/C++ compilers. It was developed by Charles "Daredevil" Scheffold and Thomas Pytel. Its footprint in the final executable file is slightly larger than that of the original PMODE because of the added functionality, but it is still less than 12 kilobytes according to its own documentation.
PMODE/DJ is a DOS extender derived from PMODE 3.07 by Matthias Grimrath for use with the DJGPP compilers. PMODE/DJ can also be used with Free Pascal.
[edit] Applications using PMODE
PMODE was originally designed to be used with demoscene demos, and this was the area of application where it became extremely popular because of its performance and compactness. These features of PMODE also made it relevant for the developers of games and embedded systems.
PMODE/W is one of the four DOS extenders included in the Open Watcom compiler distribution. PMODE/W is also the default DOS extender used by TMT Pascal.
[edit] External links
- The original distribution package of PMODE 3.07 at filegate.net
- Charles Scheffold's PMODE/W page
- PMODE/W information in TMT Pascal documentation
- DJGPP FAQ part 4 briefly lists some pros and cons of PMODE/DJ compared to CWSDPMI.