\chapentry{If You Are In a Hurry}{1}{1} \chapentry{What is DJGPP?}{2}{3} \chapentry{Hardware and Software Requirements}{3}{5} \secentry {The minimum system requirements for using DJGPP}{3}{1}{5} \secentry {Does it really work under OS/2?}{3}{2}{5} \secentry {Will it work under Windows/NT?}{3}{3}{6} \secentry {Can it run under Linux?}{3}{4}{7} \secentry {Can I run it on a 286?}{3}{5}{8} \secentry {MS-Windows applications and DJGPP}{3}{6}{8} \secentry {Machine you \emph {would like} to buy\dots {}}{3}{7}{10} \secentry {Machine most of us will \emph {actually} buy \dots {}}{3}{8}{11} \secentry {How to configure your system for DJGPP?}{3}{9}{11} \secentry {How to get the most RAM for DJGPP programs?}{3}{10}{13} \chapentry{Where and What to Download?}{4}{15} \secentry {Where can DJGPP be found?}{4}{1}{15} \secentry {CCT sites}{4}{2}{19} \secentry {How do I download DJGPP?}{4}{3}{21} \secentry {What if I don't know what \samp {FTP} is?}{4}{4}{21} \secentry {What Files to Download?}{4}{5}{22} \secentry {How much disk space will I need?}{4}{6}{27} \secentry {Can I get away with less megabytes?}{4}{7}{28} \secentry {How to uninstall a DJGPP package.}{4}{8}{29} \chapentry{The DJGPP Documentation}{5}{31} \secentry {Where are the documentation files?}{5}{1}{31} \secentry {How to read the docs without \samp {Info?}}{5}{2}{31} \secentry {How to print the docs?}{5}{3}{32} \secentry {Some docs are nowhere to be found\dots {}}{5}{4}{33} \secentry {What are these \file {foo.1} files?}{5}{5}{33} \secentry {What if the docs don't say enough?}{5}{6}{34} \chapentry{When the Compiler (or \samp {Make}, or \samp {Info}, or \dots {}) Crashes\dots {}}{6}{37} \secentry {GCC or some other DJGPP programs hang}{6}{1}{37} \secentry {GCC says ``No DPMI''}{6}{2}{37} \secentry {Buggy DPMI host or junk in DJGPP.ENV can crash v2.x programs}{6}{3}{38} \secentry {GCC can crash during optimization}{6}{4}{38} \secentry {Why does GCC say ``cannot exec \code {as}''?}{6}{5}{40} \secentry {What does ``Internal compiler error'' mean?}{6}{6}{40} \secentry {What does ``Unknown filetype'' mean?}{6}{7}{42} \secentry {Compiler hangs, but only when invoked from Make}{6}{8}{43} \secentry {Info doesn't like some files}{6}{9}{43} \secentry {Info Crashes During Startup}{6}{10}{44} \secentry {Why does Bash crash?}{6}{11}{44} \secentry {Why does the Linker Access my CD Drive?}{6}{12}{45} \secentry {Other kinds of trouble}{6}{13}{45} \secentry {I cannot keep up with the error messages}{6}{14}{46} \secentry {How to search DJGPP archives for similar problems}{6}{15}{46} \secentry {How to ask DJGPP gurus for help}{6}{16}{47} \chapentry{Compiler and Linker Performance}{7}{49} \secentry {Slow Compilation}{7}{1}{49} \secentry {Slow Linking}{7}{2}{50} \chapentry{Compile-time and Link-time Problems}{8}{53} \secentry {GCC can't find headers or libraries}{8}{1}{53} \secentry {GCC can't find C\t {++} headers}{8}{2}{55} \secentry {GCC barfs on C\t {++}-style comments in C programs}{8}{3}{56} \secentry {How does GCC recognize the source language?}{8}{4}{57} \secentry {Problems with Objective C}{8}{5}{58} \secentry {Writing codes fragments which are specific to DJGPP}{8}{6}{59} \secentry {Unresolved externals when linking programs}{8}{7}{59} \secentry {How not to lose your head with all these libraries}{8}{8}{60} \secentry {DJGPP uses a one-pass linker}{8}{9}{61} \secentry {Some functions still not found in C\t {++} programs}{8}{10}{62} \secentry {Unresolved djgpp_first_ctor}{8}{11}{63} \secentry {C\t {++} programs yield large \file {.exe} file}{8}{12}{63} \secentry {Why are DJGPP \file {.exe} files so large?}{8}{13}{63} \secentry {Linker complains about \file {djgpp.lnk}}{8}{14}{64} \secentry {Linker fails to produce the EXE program under Novell}{8}{15}{65} \secentry {Linker fails for large object files or large libraries}{8}{16}{65} \secentry {Building Allegro library fails}{8}{17}{66} \secentry {C\t {++} compiler says ``NULL redefined''}{8}{18}{66} \secentry {C\t {++} exceptions support}{8}{19}{67} \secentry {How to get GCC to generate assembly code}{8}{20}{67} \secentry {What's wrong with \file {sys/movedata.h}?}{8}{21}{68} \secentry {How do I create a library of object files?}{8}{22}{68} \chapentry{Running Compiled Programs}{9}{71} \secentry {My program crashes only in v2.0!}{9}{1}{71} \secentry {What is that gibberish printed when my program crashes?}{9}{2}{71} \secentry {Reading and writing binary files}{9}{3}{73} \secentry {Buffered screen I/O surprises}{9}{4}{73} \secentry {What do DJGPP programs need to run?}{9}{5}{74} \secentry {How many file handles can DJGPP use?}{9}{6}{74} \chapentry{Writing and Running Graphics Programs}{10}{77} \secentry {What GRX driver to use with your SVGA}{10}{1}{77} \secentry {Accessing the video memory}{10}{2}{77} \secentry {Graphics screen restoring under Windows}{10}{3}{78} \chapentry{Floating Point Issues and FP Emulation}{11}{81} \secentry {Floating-point code without 80387}{11}{1}{81} \secentry {Other FP emulators cannot be used with DJGPP}{11}{2}{81} \secentry {Floating-point emulation under OS/2}{11}{3}{82} \secentry {DJGPP doesn't support \samp {-msoft-float}}{11}{4}{82} \secentry {Numeric exceptions---sometimes}{11}{5}{82} \secentry {Floating point inaccuracies when using emulator}{11}{6}{82} \secentry {Floating point exception in Objective-C programs}{11}{7}{83} \secentry {Floating point exception in libm functions}{11}{8}{83} \chapentry{Debugging DJGPP Programs}{12}{85} \secentry {How to run a DJGPP program under debugger}{12}{1}{85} \secentry {How to begin debugging using the crash dump info}{12}{2}{86} \secentry {You need QEMM 7.53 or later}{12}{3}{90} \secentry {GDB would not debug unless it sees COFF output}{12}{4}{90} \secentry {How to debug a graphics program}{12}{5}{91} \secentry {GDB finds only \file {.cc} source}{12}{6}{92} \secentry {Can GDB print class members?}{12}{7}{92} \secentry {GDB cannot list source that was #include'd}{12}{8}{93} \secentry {GDB cannot display or set static uninitialized variables}{12}{9}{93} \secentry {Debuggers choke on some programs \dots {}}{12}{10}{94} \chapentry{Profiling DJGPP Programs}{13}{97} \secentry {How to profile a DJGPP program}{13}{1}{97} \secentry {Programs compiled with -pg crash when run}{13}{2}{97} \secentry {Gprof won't work unless it can find COFF executable}{13}{3}{98} \secentry {Where is Gprof docs?}{13}{4}{98} \secentry {Why is \code {__dpmi_int} so heavily used?}{13}{5}{98} \secentry {\samp {gprof} doesn't produce output}{13}{6}{98} \chapentry{Run-time Performance of DJGPP Programs}{14}{101} \secentry {How efficient is DJGPP-generated code?}{14}{1}{101} \secentry {Comparing newer versions with old ones}{14}{2}{101} \secentry {DJGPP programs on a Pentium}{14}{3}{102} \secentry {My program's I/O is so slow!}{14}{4}{103} \secentry {My ported program runs much slower!}{14}{5}{105} \chapentry{Run-Time Memory Issues}{15}{107} \secentry {How much virtual memory do you have?}{15}{1}{107} \secentry {It seems \code {malloc}/\code {free} don't affect virtual memory\dots {}}{15}{2}{107} \secentry {Failure to get more memory than is physically installed}{15}{3}{108} \secentry {Memory allocation fails before all memory is used}{15}{4}{108} \secentry {Memory allocation fails under Windows}{15}{5}{109} \secentry {Memory allocation peculiarities under Windows 9X}{15}{6}{109} \secentry {Memory allocation fails under EMM386 or HIMEM}{15}{7}{110} \secentry {How much memory do parent DJGPP programs leave for their child?}{15}{8}{110} \secentry {How much stack can I have in DJGPP programs?}{15}{9}{111} \chapentry{Command-line Arguments Handling in DJGPP}{16}{113} \secentry {Filename wildcards expansion under DJGPP}{16}{1}{113} \secentry {How to disable filename wildcards expansion}{16}{2}{114} \secentry {How to pass command-line arguments with quotes or \samp {@}}{16}{3}{114} \secentry {How to pass command lines longer than 126 characters}{16}{4}{115} \secentry {What is the maximum length of command line under DJGPP}{16}{5}{116} \secentry {Why Make passes only 126 characters to programs?}{16}{6}{116} \chapentry{Converting DOS Programs/Libraries to DJGPP}{17}{119} \secentry {GCC/Gas won't accept valid assembly code \dots {}}{17}{1}{119} \secentry {Converting between Intel ASM syntax and AT&T syntax}{17}{2}{120} \secentry {Converted code GP Faults!}{17}{3}{121} \secentry {Which registers need to be saved in assembly code?}{17}{4}{122} \secentry {I want to use a \file {.obj} or \file {.lib} code with DJGPP}{17}{5}{122} \secentry {I {\bf must} use my 16-bit code with DJGPP!!}{17}{6}{123} \secentry {What should I do with those ``near'' and ``far'' declarations?}{17}{7}{123} \secentry {How to convert _AX pseudo-registers?}{17}{8}{124} \chapentry{Low-level DOS/BIOS and Hardware-oriented Programming}{18}{127} \secentry {Got ``Unsupported INT 0xNN'' calling \code {int86}}{18}{1}{127} \secentry {How to use buffers with DOS/BIOS services}{18}{2}{127} \secentry {How to call software interrupt functions}{18}{3}{129} \secentry {How to move data between your program and conventional memory}{18}{4}{130} \secentry {How to move structs returned by real-mode services?}{18}{5}{132} \secentry {Fast access to absolute addresses}{18}{6}{134} \secentry {Accessing absolute address above 1MB}{18}{7}{135} \secentry {How to make DOS/BIOS call your function}{18}{8}{136} \secentry {How to hook hardware interrupts}{18}{9}{137} \secentry {Should I use _go32_XXX or __dpmi_YYY functions?}{18}{10}{140} \secentry {Hardware interrupt hooking has its subtleties}{18}{11}{140} \secentry {How to read and write ports}{18}{12}{142} \secentry {Inline Assembly code with GCC}{18}{13}{142} \secentry {Using DMA with DJGPP}{18}{14}{143} \chapentry{Legal Aspects}{19}{145} \secentry {Legal (un)restrictions on DJGPP applications}{19}{1}{145} \secentry {Legal restrictions of DJGPP utilities and libraries}{19}{2}{146} \chapentry{Getting Help}{20}{149} \secentry {Don't post DJGPP-specific problems to GNU News groups}{20}{1}{149} \secentry {How to post to the mailing list}{20}{2}{149} \secentry {How to become a subscriber to the mailing list}{20}{3}{149} \secentry {How to unsubscribe from the mailing list}{20}{4}{150} \chapentry{Version 2 vs v1.x}{21}{153} \secentry {New features in DJGPP v2}{21}{1}{153} \secentry {DJGPP environment in v2.x}{21}{2}{153} \secentry {Why are new DJGPP versions released so slowly?}{21}{3}{154} \secentry {Where to find the best C library for DJGPP}{21}{4}{155} \chapentry{Miscellany}{22}{157} \secentry {Unzipping gppNNb.zip complains about g++.exe}{22}{1}{157} \secentry {How to change a DJGPP package?}{22}{2}{157} \secentry {Where to find sample DJGPP code or a package ported to DJGPP?}{22}{3}{159} \secentry {How to create symbolic links to programs}{22}{4}{164} \secentry {Where to find the DPMI specification?}{22}{5}{164} \secentry {The DJGPP Web site.}{22}{6}{165} \secentry {Where to upload your contributions to DJGPP}{22}{7}{165} \secentry {DJGPP as cross-compiler}{22}{8}{166} \secentry {GCC says ``garbage at end of number''}{22}{9}{167} \secentry {What should sizeof (struct xyzzy) return?}{22}{10}{167} \secentry {C\t {++} doesn't pack structs!}{22}{11}{169} \secentry {How to avoid ``Abort, Retry, Fail'' messages}{22}{12}{169} \secentry {What is that \file {go32-v2.exe} program?}{22}{13}{170} \secentry {What is DXE?}{22}{14}{171} \secentry {Long Filenames Don't Work!}{22}{15}{171} \secentry {Make says ``missing separator''}{22}{16}{172} \secentry {Make says ``\file {foo} has modification time in the future''}{22}{17}{172} \secentry {How to Set Up a Dual DOS/Windows Installation}{22}{18}{173} \secentry {What is in that \file {zoneinfo} directory?}{22}{19}{174} \secentry {The Secrets of the /dev/ Directory\dots {}}{22}{20}{175} \secentry {How about switching to ELF as DJGPP's object file format?}{22}{21}{176} \secentry {How to produce random numbers?}{22}{22}{176} \secentry {What are all these buzzwords I see?}{22}{23}{177} \secentry {What should the \code {main} function return in a C program?}{22}{24}{178} \secentry {Generating the FAQ in your favorite format}{22}{25}{178} \chapentry{About this FAQ}{23}{181} \chapentry{Topic Index}{24}{183} \chapentry{Program Index}{25}{195}