PMODE


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.
Originally the source code to PMODE/W was not 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 was USD $500, although university students could purchase a license at the discounted price of US$100.
As of 2002, PMODE/W may be freely used in commercial software, provided the software is not itself a DOS extender.

Features

Like other DOS extenders, PMODE is used in the creation of 32-bit DOS applications that run in the protected mode of the 386+ CPU as opposed to real mode, which is the native execution mode of the DOS operating system, and the only mode of operation supported by older x86 processors. In particular, this facilitates straightforward access to memory above 1 MB, which cannot be addressed in real mode without special hardware, such as expanded memory boards.
A major difference between PMODE and other popular extenders is its small footprint, making it feasible to embed the whole of PMODE to the DOS-extended executable, increasing its size by approximately 10 kilobytes, and compression is supported for further reduction of the storage footprint. PMODE is therefore often appropriate where size is an issue, but there is also the advantage of eliminating the external dependency on a separate DOS extender. .
PMODE implements a subset of the DOS Protected Mode Interface specification version 0.9, and certain extensions that are not part of the DPMI. When a DPMI host is already loaded at the time the PMODE DOS-extended executable is run, PMODE plays a somewhat more passive role, generally passing DPMI requests through to the original provider. However, unlike some other DOS extenders, PMODE does not require the presence of a memory manager, although it is compatible with both XMS and VCPI, and will make use of those services if available. The DPMI compatibility allows many PMODE programs to run while Windows is loaded, although in the Windows NT-based series of Windows, DOS compatibility features are not as highly developed as in the 3.x/9x-series.
The incomplete DPMI implementation and the lack of support for virtual memory are reasons why PMODE may not be a suitable for some applications. PMODE was entirely written in x86 assembly language, and early versions were not directly usable by programs written in high level languages. The price of PMODE/W may have been a deterrent to some, although most other DOS extenders at the time commanded a comparable or higher price.
The role of PMODE as sample code illustrating the practical application of advanced, widely available, but under-used features documented in Intel 80386 manuals also should not be underestimated, since for many developers, this may have outweighed any significance of PMODE as a DOS-extender.

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.

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 . PMODE/W is also the default DOS extender used by TMT Pascal.