![]() | |
![]() The DJGPP environment, utilizingGCC | |
Developer(s) | DJ Delorie |
---|---|
Stable release | |
Repository | |
Operating system | DOS and 32-bitWindows |
Type | Compiler |
License | GNU GPL |
Website | www |
DJ's GNU Programming Platform (DJGPP)[2] is a software development suite forIntel 80386-level and above, IBMPC compatibles which supportsDOS operating systems. It is guided by DJ Delorie, who began the project in 1989. It is aport of theGNU Compiler Collection (GCC), and mostlyGNU utilities such asBash,find,tar,ls, GAWK,sed, andld toDOS Protected Mode Interface (DPMI). Supported languages includeC,C++,Objective-C/C++,Ada,Fortran, andPascal. It was originally calledDJGCC, and was later renamed from DJGCC to DJGPP when C++ support was added, though the "PP" was said to stand for "Programming Platform" rather than "Plus Plus".[3]
The compiler generates 32-bit code, which runs natively in 32-bitprotected mode while switching back to 16-bit DOS calls for basic OS support. However, unlike the OpenWatcom C/C++ compiler, it is not a zero-based flat model due to preferring NULL pointer protection for better stability. It is currently based upon a variant of theCOFF format. It can access up to 4 GB of RAM in pure DOS when using a suitableDPMI host (e.g.,CWSDPMI r7 or HDPMI32).
As of August 2020[update], main components of DJGPP 2 include:
It is also possible to use DJGPP to cross-compile software to DOS, for example on UNIX / Linux. Both the DJGPP libraries and the programs can be compiled this way, linked and then deployed to machines with DOS or DOS emulators.
DJGPP presents the programmer an interface which is compatible with theANSI C andC99 standards, DOS APIs, and an olderPOSIX-like environment. Compiled binaries arelong filename (LFN) aware and can handle such names under most 32-bit Windows by default, but they cannot use theWin16 or Win32 APIs that graphical programs on Windows need.[4]terminate-and-stay-resident (TSR) programs to support LFNs under plainDOS orWindows NT 4 are available.
While DJGPP runs in 32-bitprotected mode, its stub and library heavily rely on many 16-bit DOS and BIOS calls. Because thex86-64 versions ofWindows lack support for 16-bit programs,[5][6] there is noNTVDM, and DJGPP applications cannot be run. Under x86-64 systems these applications function only through emulation (e.g.DOSBox),x86 virtualization (e.g.VirtualBox), or similar (e.g. Linux'sDOSEMU). This problem arises because inlong mode x86-64 processors do not support thevirtual 8086 mode used to run 16-bit code in IA-32 processors. Newer x86 CPUs withVT-x do support paged real mode and unrestricted guest mode execution.
Another popular, though aging, GCC-based development system is DJGPP, D.J.[sic] Delorie's free 32-bit development environment for DOS systems.
The target hardware platform for DJGPP programs is a PC platform ... running DOS ... or a DOS-compatible operating system DJGPP programs run under Windows' "dos prompt" boxes.
16-bit MS-DOS and Microsoft Windows 3.x utilities will not start. If you attempt to start such a program, you receive a "Program.exe is not a valid Win32 application" error message.