Q: What is DJGPP?
A: DJGPP is a compiler and a set of tools that let you produce 32-bit protected-mode programs which run on MS-DOS/MS-Windows machines.
The originator and principal maintainer of DJGPP is DJ Delorie; that's where the "DJ" in "DJGPP" comes from. However, anybody is welcome and encouraged to contribute.
Programs compiled with DJGPP, and all development tools provided as part of DJGPP, look on the outside like normal DOS programs, and they rely on MS-DOS and BIOS for file I/O and other basic functions such as keyboard input, screen cursor position, etc. However, the bulk of the code in a DJGPP program is 32-bit protected-mode code; DJGPP programs use DPMI (the DOS Protected Mode Interface) to allow DOS/BIOS calls from protected mode. Therefore, any environment that can run DOS programs and provides DPMI services, will run DJGPP programs as well. Environments that are known to be compatible with DJGPP include MS-DOS, Caldera's DR-DOS, NWDOS, FreeDOS, Windows 3.X, 9X and NT, OS/2, and Linux DOSEmu. When DJGPP programs run on Windows 9X and Caldera's DR-DOS, they support long filenames.
It is important to understand that all these environments will treat DJGPP programs as DOS programs which call DPMI services. DJGPP cannot by itself create Win16 or Win32 applications; however, you can use the RSXNT package together with DJGPP to achieve this. See writing Windows applications with DJGPP.
Programs compiled with DJGPP can access all the physical memory on your machine and support virtual memory. All this memory presents a flat address space with no segmentation (you can say goodbye to far and huge pointers and to memory models), and is only limited by the amount of virtual memory supported by the DPMI server in use. A typical DPMI server can provide at least 64MB of virtual memory (if you have enough free disk space).
DJGPP is free: you don't have to pay anything to download and use it, even if you write commercial programs. DJGPP doesn't impose any restrictions on programs that you write and compile with it: you can make them commercial, shareware, freeware, or any other kind. (There are a few minor exceptions to that rule, see (un)restrictions on distribution of DJGPP apps.)
The core of DJGPP is the MS-DOS port of the GNU C/C++ compiler, GCC, and auxiliary utilities, such as assembler, linker, librarian, Make, and a hypertext docs browser. The DJGPP C library was written specifically for DJGPP, mainly by DJ Delorie himself, with help from a small group of volunteers. This core set of utilities and libraries is still actively developed and maintained.
DJGPP presents a set of tools which are remarkably ANSI- and
GCC complies to ANSI/ISO C Standard; the DJGPP C library is ANSI- and
Posix-compliant (however, a small number of Posix features, like the
fork system call, are unimplemented); the C++ libraries also
comply to the latest standards; and the GNU development tools used by
DJGPP are all Posix-compliant. As a result, DJGPP tools provide a
complete and coherent Posix layer on top of Microsoft operating systems,
to the degree that even the infamous limitations of DOS and
incompatibilities between DOS/Windows and Unix are almost completely
concealed from users and developers.
Here are some of the tasks that DJGPP is said to be good for:
DJGPP is also used as back-end for programming languages other than
C/C++. ADA, Pascal and Fortran compilers have been ported to MS-DOS
based on DJGPP; GNU Pascal (
gpc) and GNU Fortran (
available from the DJGPP archives. The latest GCC releases include
front ends for Java and Chill languages.
Starting from v2.0, DJGPP programs do not need a separate extender program, only a DPMI server to run; DJGPP includes a free 32-bit DPMI server which allows for a 32-bit, 4 GByte flat address space and up to 512 MBytes of virtual memory on plain DOS machines that lack a DPMI server of their own.
|webmaster||delorie software privacy|
|Copyright © 2001 by Eli Zaretskii||Updated Apr 2001|