DJGPP
Template:Anchor {{#invoke:Infobox|infobox}}Template:Template other{{#invoke:Check for unknown parameters | check | showblankpositional=1 | unknown = Template:Main other | preview = Page using Template:Infobox software with unknown parameter "_VALUE_"|ignoreblank=y | AsOf | author | background | bodystyle | caption | collapsetext | collapsible | developer | discontinued | engine | engines | genre | included with | language | language count | language footnote | latest preview date | latest preview version | latest release date | latest release version | latest_preview_date | latest_preview_version | latest_release_date | latest_release_version | licence | license | logo | logo alt | logo caption | logo upright | logo size | logo title | logo_alt | logo_caption | logo_upright | logo_size | logo_title | middleware | module | name | operating system | operating_system | other_names | platform | programming language | programming_language | released | replaced_by | replaces | repo | screenshot | screenshot alt | screenshot upright | screenshot size | screenshot title | screenshot_alt | screenshot_upright | screenshot_size | screenshot_title | service_name | size | standard | title | ver layout | website | qid }}Template:Main other
DJ's GNU Programming Platform (DJGPP)<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> is a software development suite for Intel 80386-level and above, IBM PC compatibles which supports DOS operating systems. It is guided by DJ Delorie, who began the project in 1989. It is a port of the GNU Compiler Collection (GCC), and mostly GNU utilities such as Bash, find, tar, ls, GAWK, sed, and ld to DOS Protected Mode Interface (DPMI). Supported languages include C, C++, Objective-C/C++, Ada, Fortran, and Pascal. It was originally called DJGCC, 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".<ref name="delorie_com-history">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>
OverviewEdit
The compiler generates 32-bit code, which runs natively in 32-bit protected mode while switching back to 16-bit DOS calls for basic OS support. However, unlike the Open Watcom 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 the COFF format. It can access up to 4 GB of RAM in pure DOS when using a suitable DPMI host (e.g., CWSDPMI r7 or HDPMI32).
Template:As of, main components of DJGPP 2 include:
- GNU Compiler Collection 9.3.0 (10.2.0, 12.2.0 and 14.2.0<ref>{{#invoke:citation/CS1|citation
|CitationClass=web }}</ref> are also available, among other versions)
- Autoconf 2.5.9
- Automake 1.9.4
- Binutils 2.35.1
- GNU Bash 4.4
- GNU Bison 2.4.1, Flex 2.5.4
- GNU Emacs 29
- GNU MPC 1.1.0, MPFR 4.1.0
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.
CompatibilityEdit
DJGPP presents the programmer an interface which is compatible with the ANSI C and C99 standards, DOS APIs, and an older POSIX-like environment. Compiled binaries are long filename (LFN) aware and can handle such names under most 32-bit Windows by default, but they cannot use the Win16 or Win32 APIs that graphical programs on Windows need.<ref name="wall">Template:Cite book</ref> terminate-and-stay-resident (TSR) programs to support LFNs under plain DOS or Windows NT 4 are available.
While DJGPP runs in 32-bit protected mode, its stub and library heavily rely on many 16-bit DOS and BIOS calls. Because the x86-64 versions of Windows lack support for 16-bit programs,<ref> {{#invoke:citation/CS1|citation |CitationClass=web }} </ref><ref> {{#invoke:citation/CS1|citation |CitationClass=web }} </ref> there is no NTVDM, 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's DOSEMU). This problem arises because in long mode x86-64 processors do not support the virtual 8086 mode used to run 16-bit code in IA-32 processors. Newer x86 CPUs with VT-x do support paged real mode and unrestricted guest mode execution.
See alsoEdit
- FreeDOS
- Cygwin - a UNIX compatibility layer with many ported libraries and applications
- EMX - a POSIX implementation for DOS (and OS/2, too)
- GnuWin32
- MinGW - a port of the GNU toolchain for Windows, designed to require minimal runtime support
- Open Watcom C/C++ compiler
- Allegro
- Windows Subsystem for Linux