home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Interactive Guide / c-cplusplus-interactive-guide.iso / c_ref / csource5 / 359_01 / readme < prev    next >
Encoding:
Text File  |  1991-10-23  |  25.1 KB  |  621 lines

  1.  
  2.  
  3. This is the README file for DJ's GCC port to DOS ("djgpp")
  4.  
  5.  
  6.  
  7. Contents:
  8.  
  9.     * Overview
  10.  
  11.     * What's available
  12.  
  13.     * How to install
  14.  
  15.     * Common questions
  16.  
  17.     * Deviations and Caveats
  18.  
  19.     * Copyright information
  20.  
  21.  
  22.  
  23. Disclaimer: This software is distributed WITHOUT ANY WARRANTY; without
  24.  
  25. even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  26.  
  27. PURPOSE.
  28.  
  29.  
  30.  
  31. DJ Delorie
  32.  
  33. USmail: 24 Kirsten Ave, Rochester, NH 03867-2954, USA
  34.  
  35. email:  dj@ctron.com
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47. Overview:
  48.  
  49.  
  50.  
  51. This package contains a 32-bit 80386 DOS extender with symbolic
  52.  
  53. debugger, a C/C++ compiler with utilities, development libraries, and
  54.  
  55. source code.  It generates full 32-bit programs and supports full
  56.  
  57. virtual memory with paging to disk. 
  58.  
  59.  
  60.  
  61. Requirements:
  62.  
  63.  
  64.  
  65. A 80386-based IBM compatible PC or PS/2, approximately 4-5Mb of hard
  66.  
  67. drive space, and 512K RAM. 
  68.  
  69.  
  70.  
  71. Supported Wares:
  72.  
  73.  
  74.  
  75. * Up to 128M of extended memory (expanded under VCPI)
  76.  
  77. * Up to 128M of disk space used for swapping
  78.  
  79. * SuperVGA 256-color mode up to 1024x768
  80.  
  81. * 80387
  82.  
  83. * XMS & VDISK memory allocation strategies
  84.  
  85. * VCPI programs, such as QEMM and 386MAX
  86.  
  87.  
  88.  
  89. Unsupported:
  90.  
  91.  
  92.  
  93. * DPMI programs, such as Windows 3.0
  94.  
  95. * Multiprocessing (fork())
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105. File location:
  106.  
  107.  
  108.  
  109.     host:      grape.ecs.clarkson.edu
  110.  
  111.     login:     ftp
  112.  
  113.     password:  send your e-mail address
  114.  
  115.     directory: ~ftp/pub/msdos/djgpp
  116.  
  117.  
  118.  
  119. Many thanks to the sysops at Clarkson for providing a home to djgpp!
  120.  
  121.  
  122.  
  123. As a convenience to non-FTP users, djgpp is also stored on Clarkson's
  124.  
  125. archive server, sun.soe.clarkson.edu.  To access the archive server,
  126.  
  127. do this:
  128.  
  129.    % mail archive-server@sun.soe.clarkson.edu
  130.  
  131.    Subject: <none>
  132.  
  133.    help
  134.  
  135.    index msdos/djgpp
  136.  
  137.    ^D
  138.  
  139.  
  140.  
  141. NOTE: In accordance with FSF CopyLeft, you are not allowed to upload
  142.  
  143. this program to a distribution site unless that site also makes the FSF
  144.  
  145. sources for these programs available.  Please read the file COPYING for
  146.  
  147. more details.  FSF sources are available on prep.ai.mit.edu, and on
  148.  
  149. either grape.ecs.clarkson.edu or sun.soe.clarkson.edu
  150.  
  151.  
  152.  
  153. NOTE: If your application links in object modules that were written
  154.  
  155. by FSF, your application counts as a "derived work" and must obey
  156.  
  157. the provisions of the FSF Copyrights.  See the file COPYING for
  158.  
  159. details.  Specifically, the C++ classes in libc.a and obstacks are
  160.  
  161. FSF works that are covered by the GNU GPL.  The mere act of compiling
  162.  
  163. does not affect the copyright status of your program.
  164.  
  165.  
  166.  
  167.  
  168.  
  169. File formats:
  170.  
  171.  
  172.  
  173.     .ZIP format - djgpp.zip - one 2.2M file, contains everything.
  174.  
  175.  
  176.  
  177.     split .ZIP - djgppzip.000 through djgppzip.005 (or so), each
  178.  
  179.                  320K-ish.  Use the merge program to merge them into 
  180.  
  181.                  djgpp.zip ("merge djgppzip djgpp.zip").
  182.  
  183.  
  184.  
  185.     other - readme, merge.c/.exe, split.c/.exe are separately available
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193. Directories:
  194.  
  195.  
  196.  
  197.     bin          all binaries (cpp, cc1, extender, etc)
  198.  
  199.     lib          all libraries (crt0.*, libc.a, libgr.a, libpc.a)
  200.  
  201.     include      all include files
  202.  
  203.     docs         all documents (including this one)
  204.  
  205.     go32         sources for the extender
  206.  
  207.     drivers      various SuperVGA drivers
  208.  
  209.     libsrc       sources for the libraries
  210.  
  211.     diffs        diffs from FSF distributions to dos-compilable
  212.  
  213.     utils        sources for the utilities
  214.  
  215.     samples      sample C++ sources using graphics & mouse
  216.  
  217.     emu387       80387 emulator for non-80387 systems
  218.  
  219.  
  220.  
  221.  
  222.  
  223. bin:
  224.  
  225.     bison.exe    lalr(1) parser
  226.  
  227.     flex.exe     lexical parser
  228.  
  229.     cpp.exe      C and C++ preprocessor
  230.  
  231.     cc1.exe      C compiler
  232.  
  233.     cc1plus.exe  C++ compiler
  234.  
  235.     as.exe       80386/80387 assembler
  236.  
  237.     ld.exe       a.out (BSD) format linker
  238.  
  239.     ar.exe       archive utility
  240.  
  241.     nm.exe       name list utility
  242.  
  243.     size.exe     a.out section size utility
  244.  
  245.     strip.exe    symbol stripper
  246.  
  247.     objdump.exe  display info from .o file
  248.  
  249.     gcc.exe      compilation coordinator
  250.  
  251.     go32.exe     basic 32-bit DOS extender
  252.  
  253.     debug32.exe  32-bit DOS extender with symbolic debugger
  254.  
  255.     stub.exe     stub to prepend on aout files to make .exe files
  256.  
  257.     aout2exe.bat turns aout file to .exe by prepending stub.exe
  258.  
  259.     diff.exe     creates diffs, including context diffs
  260.  
  261.     patch.exe    patches source from diffs, including context diffs
  262.  
  263.     djtarx.exe   tar extractor for FSF tarfiles if you don't have a tar
  264.  
  265.     utod.exe     convert Unix text files to DOS text files
  266.  
  267.     dtou.exe     convert DOS text files to Unix text files
  268.  
  269.     split.exe    split big binaries into many little binaries
  270.  
  271.     merge.exe    merge many little binaries back into one big binary
  272.  
  273.     gprof.exe    profile report generator
  274.  
  275.  
  276.  
  277. lib:
  278.  
  279.  
  280.  
  281.     libc.a       all standard routines (BSD style), and C++ methods & support
  282.  
  283.     libm.a       math routines
  284.  
  285.     libgr.a      graphics routines and mouse support
  286.  
  287.     libpc.a      routines for PC support (in/out, getkey, kbhit, screen utils)
  288.  
  289.     *_p.a        profiled libraries
  290.  
  291.     crt0.s       C runtime source
  292.  
  293.     crt0.o       C runtime object
  294.  
  295.     bison.simple bison support
  296.  
  297.     bison.hairy  bison support
  298.  
  299.     flex.skel    flex support file
  300.  
  301.     libflex.a    flex support library
  302.  
  303.  
  304.  
  305. include:
  306.  
  307.  
  308.  
  309.     Most BSD-style and SYSV-style include files.  These mostly came from
  310.  
  311.     the G++ sources.
  312.  
  313.     sys/*.h      MS-DOS specific
  314.  
  315.     graphics.h   for libgr.a
  316.  
  317.     pc.h         for libpc.a
  318.  
  319.     mouse.h      for mouse routines in libgr.a
  320.  
  321.  
  322.  
  323. docs:
  324.  
  325.  
  326.  
  327.     readme       this document
  328.  
  329.     copying      GNU General Public License
  330.  
  331.     copying.dj   Copyright information for items (C) DJ Delorie
  332.  
  333.     debug32.doc  instructions for the symbolic debugger
  334.  
  335.     internal.doc information about how the extender works
  336.  
  337.     libc.doc     differences and enhancements
  338.  
  339.     libm.doc     list of implemented functions
  340.  
  341.     libpc.doc    documentation
  342.  
  343.     libgr.doc    documentation
  344.  
  345.  
  346.  
  347. go32:
  348.  
  349.  
  350.  
  351.     sources for the extender.  Requires Turbo C and Turbo Assembler
  352.  
  353.  
  354.  
  355. drivers:
  356.  
  357.  
  358.  
  359.     VGA and SuperVGA drivers - source and binary.  Use the GO32 environment
  360.  
  361.     variable to select and configure one of these according to the VGA card
  362.  
  363.     you have.
  364.  
  365.  
  366.  
  367. libsrc:
  368.  
  369.  
  370.  
  371.     Sources for the libraries.  These are compiled with gcc.  The makefile
  372.  
  373.     is set up for NDMAKE.  The source files came from three sources:
  374.  
  375.     
  376.  
  377.         (1) Me.  Mostly the system call routines, and some string routines.
  378.  
  379.             All of libpc.a, libgr.a, libm.a .
  380.  
  381.         (2) FSF.  These are the GCC support routines, C++ support, and
  382.  
  383.             other routines that came with gcc (malloc, obstack, alloca, etc)
  384.  
  385.         (3) BSD.  These are mostly the stdio and stdlib routines, and
  386.  
  387.             the rest of the string routines.  BSD requires that I mention
  388.  
  389.             that their sources are copyright BSD and that I have modified
  390.  
  391.             some to comply with the include files provided by FSF.  These
  392.  
  393.             sources are the "freed files" everyone keeps talking about.
  394.  
  395.  
  396.  
  397. diffs:
  398.  
  399.  
  400.  
  401.     Context diffs from the original FSF sources to the GNUDOS sources.  See
  402.  
  403.     the README and VERSIONS files in that directory for more info.
  404.  
  405.  
  406.  
  407. utils:
  408.  
  409.  
  410.  
  411.     Sources for djtarx, utod, dtou, split, and merge.
  412.  
  413.  
  414.  
  415. samples:
  416.  
  417.  
  418.  
  419.     Various samples showing how to use the mouse, graphics, C++, setjmp(),
  420.  
  421.     etc.
  422.  
  423.  
  424.  
  425. emu387:
  426.  
  427.  
  428.  
  429.     80387 emulator and source code.  I don't expect this to work perfectly,
  430.  
  431.     but should cover most normal floating point math.  To use, add
  432.  
  433.     "emu /djgpp/emu387/emu387" to the GO32 environment variable.  (ie:
  434.  
  435.     set GO32=emu /djgpp/emu387/emu387)
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453. INSTALLING:
  454.  
  455.  
  456.  
  457. To install, you must do the following:
  458.  
  459.  
  460.  
  461. * Create a directory to install in, like c:\djgpp.
  462.  
  463.  
  464.  
  465. * Create a "temp" directory, like c:\tmp.
  466.  
  467.  
  468.  
  469. * Un-zip djgpp.zip in that directory.
  470.  
  471.     C:\DJGPP> pkunzip -d djgpp.zip
  472.  
  473.  
  474.  
  475. * Add the following lines to C:\AUTOEXEC.BAT:
  476.  
  477.     set GCCBIN=c:\djgpp\bin
  478.  
  479.                  ^ Use DOS slashes here so that AOUT2EXE.BAT will work
  480.  
  481.     set GCCINC=c:/djgpp/include
  482.  
  483.     set GCCLIB=c:/djgpp/lib
  484.  
  485.     set GCCTMP=c:/tmp
  486.  
  487.     set GO32TMP=c:/tmp
  488.  
  489.     set GO32=ansi driver c:/djgpp/drivers/SOMETHING.grd gw 1024 gh 768
  490.  
  491.                          ^^^ whatever driver works with your VGA (optional)
  492.  
  493.     set BISON_SIMPLE=c:/djgpp/lib/bison.simple
  494.  
  495.     set BISON_HAIRY=c:/djgpp/lib/bison.hairy
  496.  
  497.     set FLEX_SKELETON=c:/djgpp/lib/flex.skeleton
  498.  
  499.  
  500.  
  501.   TMP and TEMP are checked if GCCTMP isn't set
  502.  
  503.   GO32TMP is where go32 puts its paging file (GCCTMP, TMP, TEMP are checked,
  504.  
  505.   in that order, also)
  506.  
  507.  
  508.  
  509.   Remember that unless you manually type these at the command line,
  510.  
  511.   they won't take effect until you reboot.  Don't include the "ansi"
  512.  
  513.   keyword in the "go32" variable if you don't have an ANSI.SYS driver
  514.  
  515.   or equivalent.
  516.  
  517.  
  518.  
  519. * Add your binaries directory to your PATH in C:\AUTOEXEC.BAT
  520.  
  521.     SET PATH= . . . ;C:\DJGPP\BIN
  522.  
  523.  
  524.  
  525. That's it! G++ is now installed on your system.
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537. The GO32 environment variable:
  538.  
  539.  
  540.  
  541.  
  542.  
  543. This variable controls the options available in go32 or debug32.  The
  544.  
  545. syntax of this variable is:
  546.  
  547.  
  548.  
  549.   SET GO32=[parm [value]] [parm [value]] . . .
  550.  
  551.  
  552.  
  553. Parameters:
  554.  
  555.  
  556.  
  557.   ansi           Use ANSI commands to control the color in debug32
  558.  
  559.   mono           Use the Monochrome monitor for debugging - useful when
  560.  
  561.                    debugging graphics applications
  562.  
  563.   1rm            Redirect stdout (file #1) to the monochrome monitor
  564.  
  565.   2rm            Redirect stderr (file #2) to the monochrome monitor
  566.  
  567.   1r2            Redirect stdout (file #1) to stderr (file #2)
  568.  
  569.   2r1            Redirect stderr (file #2) to stdout (file #1)
  570.  
  571.  
  572.  
  573.   emu [path]     Use the specified file as the 80387 emulator
  574.  
  575.  
  576.  
  577.   driver [path]  Use the specified file as the graphics driver
  578.  
  579.   gw [width]     Default graphics width
  580.  
  581.   gh [height]    Default graphics height
  582.  
  583.   tw [width]     Default text width
  584.  
  585.   th [height]    Default text height
  586.  
  587.  
  588.  
  589.  
  590.  
  591. These parameters may occur in any order.
  592.  
  593.  
  594.  
  595. Note that "1rm" and "2rm" are done before "1r2" and "2r1", so "1rm 2r1" sends
  596.  
  597. stdout to the mono monitor and stderr to any redirection used.
  598.  
  599.  
  600.  
  601. Examples:
  602.  
  603.  
  604.  
  605.   C:\> set GO32=mono driver c:\djgpp\drivers\tseng4k.grd gw 1024 gh 768 tw 132 th 43
  606.  
  607.   C:\> set GO32=ansi
  608.  
  609.   C:\> set GO32=driver c:\djgpp\drivers\tseng4k.grd ansi
  610.  
  611.   C:\> set GO32=mono 1rm 2rm
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627. Common Questions:
  628.  
  629.  
  630.  
  631. Q: When I run "gcc e:\proj\prog.c" it says "undefined escape sequence \p"?
  632.  
  633. A: Gcc is a *unix* compiler - you must use *unix* slashes (e:/proj/prog.c).
  634.  
  635.    Environment variables (like GCCINC) may, however, use either, as they
  636.  
  637.    are converted.
  638.  
  639.  
  640.  
  641. Q: I type "GCC PROG.C" and ld complains about PROG.C not being an object.
  642.  
  643. Q: I type "gcc prog.cxx" to compile a C++ program, and ld complains.
  644.  
  645. A: Gcc is *not* case insensitive like DOS is, and it uses the file's
  646.  
  647.    extension to determine how to compile a file.  Valid extensions are:
  648.  
  649.      .cc = C++ source (passed through cpp)
  650.  
  651.      .c = C source that must be passed through cpp first
  652.  
  653.      .i = raw C source (no cpp pass)
  654.  
  655.      .S = assembler that must be passed through cpp first
  656.  
  657.      .s = raw assembler source (no cpp pass)
  658.  
  659.    any other file is passed to the linker
  660.  
  661.  
  662.  
  663. Q: I compile my program, but can't run the output file.
  664.  
  665. A: DOS doesn't know how to run unix-style a.out files.  That's what the
  666.  
  667.    extender is for.  To run an a.out file called myprog, type
  668.  
  669.      "go32 myprog . . ."
  670.  
  671.  
  672.  
  673. Q: Gcc doesn't recognize // as a comment in my C programs.
  674.  
  675. A: That's because // isn't a comment in C.  If you want to compile C++,
  676.  
  677.    then write C++ programs.  Gcc is really two compilers in one, not
  678.  
  679.    one compiler that compiles both C and C++.  That's why you get
  680.  
  681.    cc1 and cc1plus.
  682.  
  683.  
  684.  
  685. Q: I'm reading in data files, but the data gets corrupted.
  686.  
  687. A: The default file type is DOS text, even for read() and write().  You must
  688.  
  689.    tell the system that a file is binary through the "b" flag in fopen(),
  690.  
  691.    or O_BINARY in open().
  692.  
  693.  
  694.  
  695. Q: I get "fatal signal 2" when I run gcc.
  696.  
  697. A: When gcc reports a "signal", it really means that an error occurred
  698.  
  699.    trying to run the given program.  The "signal" number is the DOS error
  700.  
  701.    code, and 2 means "file not found".  Check the GCCBIN environment
  702.  
  703.    variable and make sure it points to the directory with cpp.exe,
  704.  
  705.    cc1.exe, etc.
  706.  
  707.  
  708.  
  709. Q: The binaries I get with the distribution are .exe files, but gcc creates
  710.  
  711.    a.out files.  I rename the a.out's to .EXE's, but they still don't work.
  712.  
  713. A: To get an .EXE from an a.out, you must *prepend* either go32.exe,
  714.  
  715.    debug32.exe, or stub.exe to the file:
  716.  
  717.      copy /b stub.exe+myprog myprog.exe
  718.  
  719.  
  720.  
  721. Q: What is stub.exe?
  722.  
  723. A: Stub.exe simply calles go32.exe, and passes it information it needs to
  724.  
  725.    run the a.out file attached to it.  Stub is much smaller than go32, so
  726.  
  727.    less disk space is used.  Also, if you change go32, you don't have to
  728.  
  729.    change stub, and all the stub-ized programs will use the new go32
  730.  
  731.    automatically.
  732.  
  733.  
  734.  
  735. Q: I want to change cc1.  How do I do this?
  736.  
  737. A: First, get the GNU sources from FSF.  They're usually available at
  738.  
  739.    prep.ai.mit.edu in /u/emacs, if not elsewhere.  Use djtarx to un-tar
  740.  
  741.    them, as djtarx knows how to handle unix file names that aren't valid
  742.  
  743.    DOS file names.  Look in the "diffs" sources to see what to change the
  744.  
  745.    names to when they conflict.  Next, apply the "diffs" over the
  746.  
  747.    GNU sources (making sure you have the right version of GNU - see the
  748.  
  749.    versions file).  For the gcc-1.39 sources, you must run utod (or some
  750.  
  751.    other unix-to-dos converter) to compile gcc.exe, then run config-d.bat,
  752.  
  753.    then run makeall.bat.  For gpp-1.39, copy the g++ sources over the
  754.  
  755.    completed gcc sources, apply the gpp diffs, then run makeall.bat (gpp's
  756.  
  757.    now).  For all other programs, just run make.  Note that the makefiles
  758.  
  759.    are tuned for ndmake, since it knows how to make response files.
  760.  
  761.    Specific instructions are documented in the diffs directory.
  762.  
  763.  
  764.  
  765. Q: I don't have an 80387.  How do I compile floating point programs?
  766.  
  767. A: Add "emu c:\djgpp\emu387\emu387" to the GO32 environment variable
  768.  
  769.    (see go32 section above).  This tells go32 to use the given file
  770.  
  771.    as an 80387 emulator.  If you don't load this emulator, and you try
  772.  
  773.    to run floating point without a 387, you will get an error.
  774.  
  775.  
  776.  
  777. Q: I installed an 80387 emulator in my AUTOEXEC, but it still doesn't
  778.  
  779.    work.  Why?
  780.  
  781. A: The CPU is running in *protected* mode, not real mode, and the information
  782.  
  783.    needed to emulate the 80387 is different.  Not to mention that the
  784.  
  785.    exceptions never get to the real-mode handler.  You must use the emu387
  786.  
  787.    emulator, which is designed for go32.
  788.  
  789.  
  790.  
  791. Q: I can't run a.out programs under Windows.
  792.  
  793. A: Nope, you can't.  Go32 only supports VCPI, and Windows provides
  794.  
  795.    DPMI 0.9, which isn't enough for Go32 to work correctly.
  796.  
  797.  
  798.  
  799. Q: Can I run this on my 286?  It has protected mode also...
  800.  
  801. A: True, but the 286 isn't a 32-bit processor.  A 386 really is required.
  802.  
  803.  
  804.  
  805. Q: Can I use gcc on my 512K machine?
  806.  
  807. A: Yes, but the disk better have at least 4Mb of free space for paging.
  808.  
  809.    Go32 will use all available extended memory (up to 128M) and up to
  810.  
  811.    128M of disk space, for a grand total of 256M of virtual memory for
  812.  
  813.    your application.  Try a malloc(50*1024*1024) some day.
  814.  
  815.  
  816.  
  817. Q: Why do my compiles are running VERY SLOW, even though I use a ramdisk
  818.  
  819.    for swap and a disk cache?
  820.  
  821. A: Gcc requires at least 1Mb of virtual memory to run, usually close to 1.5M.
  822.  
  823.    If there isn't this much real memory available, it starts paging to disk.
  824.  
  825.    It's good to leave about 1M of extended (not expanded) memory available
  826.  
  827.    for go32 to run programs with.  When it needs to page a lot, you spend
  828.  
  829.    most of your time paging and little time actually running.  Note that
  830.  
  831.    if you are running with a VCPI server, like QEMM or 386MAX, then go32
  832.  
  833.    will use *expanded* memory for it's physical memory needs, not
  834.  
  835.    extended.
  836.  
  837.  
  838.  
  839. Q: How much memory is available when I use the system() call?
  840.  
  841. A: Everything but what go32 is loaded with.  The program is completely
  842.  
  843.    paged out to memory (including the page tables themselves) before
  844.  
  845.    the second program is executed.  Currently, this is about 100K
  846.  
  847.    less than was available before go32 was executed.
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861. Deviations and Caveats:
  862.  
  863.  
  864.  
  865. GCC/G++ deviates from the U**x version in a number of ways, mostly to
  866.  
  867. accomodate deficiencies in the MS-DOS environment, and my own laziness.
  868.  
  869.  
  870.  
  871. * An 80387 is required to do floating point.  An emulator is provided.
  872.  
  873.   cc1 and cc1plus shouldn't use the 387 unless compiling floating point
  874.  
  875.   code.  The environment variable "387" can override the auto-detection
  876.  
  877.   routine:
  878.  
  879.     SET 387=YES   to force 387 handlers to be enabled
  880.  
  881.     SET 387=NO    to force 387 accesses to fault
  882.  
  883.     SET 387=QUERY to get a message showing the results of the auto-detection
  884.  
  885.   If no 80387 is present and the program attempts to use it, a message
  886.  
  887.   indicating where the instruction is will be displayed.  To use the
  888.  
  889.   387 emulator, add "emu c:\djgpp\emu387\emu387" to the GO32 environment
  890.  
  891.   variable.  Specifying use of the emulator overrides the "387"
  892.  
  893.   environment variable.
  894.  
  895.  
  896.  
  897. * The VDISK method of allocating extended memory is supported.  The
  898.  
  899.   INT 15h method is also.  When the extender runs out of conventional and
  900.  
  901.   extended memory, it uses a paging file named $(GCCTMP)/pageXXXX.386, where
  902.  
  903.   XXXX is an unspecified hex value.  This file is normally removed on exit.
  904.  
  905.  
  906.  
  907. * Up to 128 MB of physical memory and 128 MB of disk swap space are allowed.
  908.  
  909.   A 512K machine is sufficient, but very slow due to paging.
  910.  
  911.  
  912.  
  913. * The utilies support the MS-DOS standard response file method for giving
  914.  
  915.   more than 128 bytes of command line.  Example: "gcc -o foo @foo.lnk" where
  916.  
  917.   foo.lnk contains a list of .o files.
  918.  
  919.  
  920.  
  921. * Since MS-DOS does not distinguish case in file names, some .h files
  922.  
  923.   used for C++ have had underscores prepended to them to avoid conflict
  924.  
  925.   (ie: String.h conflicts with string.h, so it became _String.h).
  926.  
  927.  
  928.  
  929. * When using ar to create archives, be warned that the ar version
  930.  
  931.   supplied cannot update an archive that's been sequenced (ar s foo.a),
  932.  
  933.   and cannot sequence a file that's been sequenced.  Also, ld cannot
  934.  
  935.   use an archive that's not sequenced.  The following method is suggested:
  936.  
  937.       ar rv mylib.a $(OBJS)
  938.  
  939.       cp mylib.a mylib2.a
  940.  
  941.       ar rvs mylib2.a
  942.  
  943.       (and then link with mylib2.a)
  944.  
  945.  
  946.  
  947. * The extender can be added to any gcc-compiled program by copying go32.exe
  948.  
  949.   to be <program>.exe, where <program> is the 32-bit program.  For example,
  950.  
  951.   if "hello" is a gcc-compiled a.out file, and "hello.exe" is a copy of
  952.  
  953.   go32.exe, then when "hello.exe" runs, it loads the file called "hello"
  954.  
  955.   in the same directory, and executes it if present.  Otherwise,
  956.  
  957.   the first parameter is the executable (ie: go32 cc1plus foo.cc).
  958.  
  959.  
  960.  
  961. * The extender can be merged to create one .exe file that is the extender
  962.  
  963.   and the executable in one file, by using the stub.exe program:
  964.  
  965.       copy /b stub.exe+myprog myprog.exe
  966.  
  967.   This will only work if go32.exe is in your search path, because stub.exe
  968.  
  969.   runs it.  Alternatively, you can prepend go32.exe itself to an a.out file
  970.  
  971.   to get a single executable (stub.exe is much smaller).  Note that if
  972.  
  973.   you re-compile go32 or stub, you must strip off the symbol table first. 
  974.  
  975.  
  976.  
  977. * The extender runs programs at logical address 0.  A copy of the first
  978.  
  979.   1 MB of physical memory (including the AT channel) is mapped to
  980.  
  981.   0xE0000000 in the program's address space.  The stack grows down from
  982.  
  983.   0x7FFFFFFC in the program's address space.  Data usually starts at
  984.  
  985.   0x00400000.
  986.  
  987.  
  988.  
  989. * The paging mechanism understands how SuperVGA's map their memory onto
  990.  
  991.   the AT bus and automatically swaps pages as the program tries to
  992.  
  993.   access them.  The program sees a linear range from 0xD0000000 to
  994.  
  995.   0xD0100000 that corresponds to each pixel in the 256-color modes
  996.  
  997.   of SuperVGAs.  To use this feature, you'll have to set the GO32
  998.  
  999.   environment variable like this:
  1000.  
  1001.     C>set go32=driver c:\djgpp\drivers\tseng4k.grd gw 640 gh 480 tw 132 th 43
  1002.  
  1003.   These parameter pairs can be omitted or rearranged as needed.  They are
  1004.  
  1005.   the "driver" name, default graphics width and height, and default
  1006.  
  1007.   text width and height. Libgr.a doesn't have to be recompiled, nor
  1008.  
  1009.   do graphics programs, when a different graphics mode is selected
  1010.  
  1011.   (the extender handles it).  It is strongly recommended that the program
  1012.  
  1013.   use the GR_default_graphics and GR_default_text modes to switch to
  1014.  
  1015.   graphics or text.  These modes use the parameters specified by the
  1016.  
  1017.   GO32 environment variable, allowing the user to select a favorite
  1018.  
  1019.   graphics and text mode.
  1020.  
  1021.  
  1022.  
  1023. * Symbols are stored in virtual memory, so you won't run out of symbol
  1024.  
  1025.   space until both extended memory and the disk are all used up.  For
  1026.  
  1027.   large programs, you might notice a slight delay while it looks up
  1028.  
  1029.   symbols.  Programs with a lot of lines in a given module may run out
  1030.  
  1031.   of memory as the line number table is built in real memory and transferred
  1032.  
  1033.   to virtual memory.
  1034.  
  1035.  
  1036.  
  1037. * Signals are not reported to the program.  However, interrupts do continue
  1038.  
  1039.   to get serviced while in protected mode (ie: keypress, timer, etc).
  1040.  
  1041.   CTRL-C will get you back to the debugger in debug32, and you can continue
  1042.  
  1043.   from where you stopped.  All signals (ie: exceptions) cause debugging
  1044.  
  1045.   traps in debug32, or general faults in go32.
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053. Copyright Information:
  1054.  
  1055.  
  1056.  
  1057. * Source code for the GNU utilities is copyright (c) Free Software Foundation.
  1058.  
  1059.   For more information on the FSF copyright, see their source code or write
  1060.  
  1061.   Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  1062.  
  1063.  
  1064.  
  1065.   A copy of their file "COPYING" is included in the docs directory.  Some of
  1066.  
  1067.   the FSF source code has been modified to operate properly in the MS-DOS
  1068.  
  1069.   environment.
  1070.  
  1071.  
  1072.  
  1073. * Source code for most of libc.a are copyright (c) Regents of the University
  1074.  
  1075.   of California.  These files include copyright information in them.  The
  1076.  
  1077.   utilities are compiled against these libraries, and thus contain software
  1078.  
  1079.   developed by the University of California, Berkeley, and its contributors.
  1080.  
  1081.   Some of the BSD source code has been modified to operate properly in the
  1082.  
  1083.   MS-DOS environment.
  1084.  
  1085.  
  1086.  
  1087. * Any sources not falling under the copyrights of FSF or UCB (as above) are
  1088.  
  1089.   Copyright (c) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954.
  1090.  
  1091.   To contact me via E-Mail, sent to "dj@ctron.com".  Cabletron Systems Inc
  1092.  
  1093.   is in no way involved with this project; I just happen to work for them
  1094.  
  1095.   during the day.
  1096.  
  1097.  
  1098.  
  1099. Terms and Conditions:
  1100.  
  1101.  
  1102.  
  1103. * Source code copyright FSF is distributed under the terms of the GNU
  1104.  
  1105.   Public General License.  See the file "COPYING" in doc.arc for more
  1106.  
  1107.   information.  If your program links in object modules (in libc.a) that
  1108.  
  1109.   are compiled from GNU sources, then your entire program must be
  1110.  
  1111.   distributed under the terms of the GNU GPL as a "derived work".  These
  1112.  
  1113.   modules are the C++ class library (including the streams classes) and
  1114.  
  1115.   obstacks.  The sources in libsrc have the copyright notices in them
  1116.  
  1117.   for the various modules.
  1118.  
  1119.  
  1120.  
  1121. * Source code copyright UCB is distributed under the terms listed in the
  1122.  
  1123.   UCB source code itself.
  1124.  
  1125.  
  1126.  
  1127. * Source code copyright DJ Delorie is distributed under the terms of the
  1128.  
  1129.   GNU General Public Licence, with the following exceptions:
  1130.  
  1131.   ("go32.exe" refers to go32.exe and debug32.exe)
  1132.  
  1133.  
  1134.  
  1135.   * There are no conditions on distributing copies of stub.exe as
  1136.  
  1137.     it is originally distributed in this software package.
  1138.  
  1139.  
  1140.  
  1141.   * If a user creates an application, prepends a copy of go32.exe onto
  1142.  
  1143.     the beginning of it, and distributes it free of charge, then the
  1144.  
  1145.     user is under no obligations to distribute source or pay royalties.
  1146.  
  1147.     Note that the copyright terms of the FSF and/or UCB must be
  1148.  
  1149.     obeyed regardless of this.
  1150.  
  1151.   
  1152.  
  1153.   * If a user creates an application, prepends a copy of go32.exe onto
  1154.  
  1155.     the beginning of it, and charges a fee for the software, then a
  1156.  
  1157.     royalty of $5 or 5% of the selling price per copy sold must be paid
  1158.  
  1159.     to DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954.  Note that
  1160.  
  1161.     shareware programs are not considered "sold" until payment is rendered
  1162.  
  1163.     for them.
  1164.  
  1165.  
  1166.  
  1167.   * For all other cases, source code for go32.exe must be distributed
  1168.  
  1169.     with any distributed copies of go32.exe.
  1170.  
  1171.   
  1172.  
  1173.   * Software that requires go32.exe to run, but is not distributed with
  1174.  
  1175.     a copy of go32.exe, incurs no obligations with regards to the
  1176.  
  1177.     above sections.
  1178.  
  1179.  
  1180.  
  1181.   * Contact me for special terms if none of the above are suitable.
  1182.  
  1183.  
  1184.  
  1185.   * Donations are always appreciated.
  1186.  
  1187.  
  1188.  
  1189.   The intent of this copyright is this: If you make money by using the
  1190.  
  1191.   programs I wrote, I get some of it.  If you use your sources to
  1192.  
  1193.   teach others how to write programs, I'll support you.
  1194.  
  1195.  
  1196.  
  1197.   Changes to source code copyright BSD or FSF are copyright DJ Delorie, but
  1198.  
  1199.   fall under the terms of the original copyright.
  1200.  
  1201.  
  1202.  
  1203.  
  1204.  
  1205.  
  1206.  
  1207.  
  1208.  
  1209.  
  1210.  
  1211. Donations may be made to any of the following:
  1212.  
  1213.  
  1214.  
  1215.     DJ Delorie
  1216.  
  1217.     24 Kirsten Ave
  1218.  
  1219.     Rochester, NH  03867-2954
  1220.  
  1221.     USA
  1222.  
  1223.  
  1224.  
  1225.     Free Software Foundation
  1226.  
  1227.     675 Mass Ave
  1228.  
  1229.     Cambridge, MA 02139
  1230.  
  1231.     USA
  1232.  
  1233.  
  1234.  
  1235.     University of California
  1236.  
  1237.     Berkeley, CA  (sorry, I don't know their ZIP code)
  1238.  
  1239.     USA
  1240.  
  1241.