home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / msdos / djgpp / readme < prev    next >
Encoding:
Text File  |  1993-07-17  |  13.9 KB  |  367 lines

  1.  
  2. This is the README file for DJ's GCC port to DOS ("djgpp")
  3.  
  4. Contents:
  5.     * Overview
  6.     * What's available
  7.     * How to install
  8.     * Deviations and Caveats
  9.     * Copyright information
  10.  
  11. Disclaimer: This software is distributed WITHOUT ANY WARRANTY; without
  12. even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  13. PURPOSE.
  14.  
  15. DJ Delorie
  16. USmail: 24 Kirsten Ave, Rochester, NH 03867-2954, USA
  17. email:  dj@ctron.com
  18.  
  19. mailing list: djgpp@sun.soe.clarkson.edu (listserv@sun.soe.clarkson.edu)
  20.      djgpp-announce@sun.soe.clarkson.edu (listserv@sun.soe.clarkson.edu)
  21.  
  22.  
  23.  
  24.  
  25. Overview:
  26.  
  27. This package contains a 32-bit 80386 DOS extender with symbolic
  28. debugger, a C/C++ compiler with utilities, development libraries, and
  29. source code.  It generates full 32-bit programs and supports full
  30. virtual memory with paging to disk. 
  31.  
  32. Requirements:
  33.  
  34. A 80386-based IBM compatible PC or PS/2, approximately 4-5Mb of hard
  35. drive space, and 512K RAM.  Available extended (or expanded under VCPI)
  36. memory is strongly recommended.
  37.  
  38. Supported Wares:
  39.  
  40. * Up to 128M of extended memory (expanded under VCPI)
  41. * Up to 128M of disk space used for swapping
  42. * SuperVGA 256-color mode up to 1024x768
  43. * 80387
  44. * XMS & VDISK memory allocation strategies
  45. * VCPI programs, such as QEMM, DESQview, and 386MAX
  46. * DPMI programs, such as Windows 3.x, OS/2, and QDPMI
  47.  
  48. Unsupported:
  49.  
  50. * Multiprocessing (fork())
  51.  
  52.  
  53.  
  54.  
  55. File location:
  56.  
  57.     host:      omnigate.clarkson.edu
  58.     login:     ftp
  59.     password:  send your e-mail address
  60.     directory: ~ftp/pub/msdos/djgpp
  61.  
  62. Many thanks to the sysops at Clarkson for providing a home to djgpp!
  63.  
  64. As a convenience to non-FTP users, djgpp is also stored on Clarkson's
  65. archive server.  To access the archive server, do this:
  66.  
  67.    % mail archive-server@omnigate.clarkson.edu
  68.    Subject: <none>
  69.    help
  70.    index msdos/djgpp
  71.    ^D
  72.  
  73. NOTE: In accordance with FSF CopyLeft, you are not allowed to upload
  74. this program to a distribution site unless you upload the source modules
  75. with any binary module you upload.  Please read the file COPYING for
  76. more details. 
  77.  
  78. NOTE: If your application links in object modules that were written by
  79. FSF, your application counts as a "derived work" and must obey the
  80. provisions of the FSF Copyrights.  See the file COPYING for details. 
  81. All FSF source-based libraries are in the file libgpl.a.  The mere act
  82. of compiling does not affect the copyright status of your program. 
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92. INSTALLING:
  93.  
  94. To install, you must do the following:
  95.  
  96. * Create a "temp" directory, like c:\tmp.
  97.  
  98. * Create a directory to install in, like c:\djgpp.
  99.  
  100. * Un-zip the appropriate zipfiles in the install directory.
  101.     C:\DJGPP> pkunzip -d -o djdev110.zip
  102.     C:\DJGPP> pkunzip -d -o gas221bn.zip
  103.     C:\DJGPP> pkunzip -d -o gcc241bn.zip
  104.  
  105. * Add the following lines to C:\CONFIG.SYS file (or edit existing
  106.   files= and shell= lines as appropriate).  The files= line prevents "too many
  107.   open files" errors when compiling, and the shell= line prevents "Out of
  108.   environment space" errors when setting lots of environment variables.
  109.  
  110.     files=15
  111.     shell=c:\command.com c:\ /e:600 /p
  112.  
  113. The values 15 and 600 are close to minimal.  You may want to increase them
  114. to provide a little more margin.
  115.  
  116.  
  117. * Add the following lines to C:\AUTOEXEC.BAT:
  118.     set COMPILER_PATH=c:/djgpp/bin
  119.     set C_INCLUDE_PATH=c:/djgpp/include
  120.     set CPLUS_INCLUDE_PATH=c:/djgpp/cplusinc;c:/djgpp/include
  121.           ^^^ only needed if you are compiling c++ programs
  122.     set OBJC_INCLUDE_PATH=c:/djgpp/include
  123.           ^^^ only needed if you are compiling objective-C programs
  124.     set OBJCPLUS_INCLUDE_PATH=c:/djgpp/include
  125.           ^^^ only needed if you are compiling objective-C++ programs
  126.     set LIBRARY_PATH=c:/djgpp/lib
  127.     set TMPDIR=c:/tmp
  128.              ^^^ this is where gcc's temp files go
  129.     set GO32TMP=c:/tmp
  130.                 ^^^ this is where your paging file goes - if not set, the
  131.                     variables TMP and TEMP are checked in that order
  132.     set GO32=ansi driver c:/djgpp/drivers/SOMETHING.grd gw 1024 gh 768
  133.                          ^^^ whatever driver works with your VGA (optional)
  134.     set BISON_SIMPLE=c:/djgpp/lib/bison.simple
  135.           ^^^ only needed if you use bison
  136.     set BISON_HAIRY=c:/djgpp/lib/bison.hairy
  137.           ^^^ only needed if you use bison
  138.     set FLEX_SKELETON=c:/djgpp/lib/flex.skeleton
  139.           ^^^ only needed if you use flex
  140.  
  141.   Remember that unless you manually type these at the command line,
  142.   they won't take effect until you reboot.  Don't include the "ansi"
  143.   keyword in the "go32" variable if you don't have an ANSI.SYS driver
  144.   or equivalent.
  145.  
  146. * Add your binaries directory to your PATH in C:\AUTOEXEC.BAT
  147.     SET PATH= . . . ;C:\DJGPP\BIN
  148.  
  149. That's it! djgpp is now installed on your system.
  150.  
  151.  
  152.  
  153.  
  154.  
  155. The GO32 environment variable:
  156.  
  157.  
  158. This variable controls the options available in go32 or debug32.  The
  159. syntax of this variable is:
  160.  
  161.   SET GO32=[parm [value]] [parm [value]] . . .
  162.  
  163. Parameters:
  164.  
  165.   ansi           Use ANSI commands to control the color in debug32
  166.   mono           Use the Monochrome monitor for debugging - useful when
  167.                    debugging graphics applications
  168.   1rm            Redirect stdout (file #1) to the monochrome monitor
  169.   2rm            Redirect stderr (file #2) to the monochrome monitor
  170.   1r2            Redirect stdout (file #1) to stderr (file #2)
  171.   2r1            Redirect stderr (file #2) to stdout (file #1)
  172.  
  173.   glob           enable globbing (default)
  174.   noglob         disable globbing
  175.  
  176.   emu [path]     Use the specified file as the 80387 emulator
  177.  
  178.   driver [path]  Use the specified file as the graphics driver
  179.   gw [width]     Default graphics width
  180.   gh [height]    Default graphics height
  181.   tw [width]     Default text width
  182.   th [height]    Default text height
  183.   nc [colors]    Number of colors (for new-style drivers only - see cbgrx*.zip)
  184.  
  185.  
  186. These parameters may occur in any order.
  187.  
  188. Note that "1rm" and "2rm" are done before "1r2" and "2r1", so "1rm 2r1" sends
  189. stdout to the mono monitor and stderr to any redirection used.
  190.  
  191. Examples:
  192.  
  193.   C:\> set GO32=mono driver c:\djgpp\drivers\tseng4k.grd gw 1024 gh 768 tw 132 th 43 nc 256
  194.   C:\> set GO32=ansi
  195.   C:\> set GO32=driver c:\djgpp\drivers\tseng4k.grd ansi
  196.   C:\> set GO32=mono 1rm 2rm
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207. Deviations and Caveats:
  208.  
  209. GCC/G++ deviates from the U**x version in a number of ways, mostly to
  210. accomodate deficiencies in the MS-DOS environment, and my own laziness.
  211.  
  212. * An 80387 is required to do floating point.  An emulator is provided.
  213.   cc1 and cc1plus shouldn't use the 387 unless compiling floating point
  214.   code.  The environment variable "387" can override the auto-detection
  215.   routine:
  216.     SET 387=YES   to force 387 handlers to be enabled
  217.     SET 387=NO    to force 387 accesses to fault
  218.     SET 387=QUERY to get a message showing the results of the auto-detection
  219.   If no 80387 is present and the program attempts to use it, a message
  220.   indicating where the instruction is will be displayed.  To use the
  221.   387 emulator, add "emu c:\djgpp\emu387\emu387" to the GO32 environment
  222.   variable.  Specifying use of the emulator overrides the "387"
  223.   environment variable and autodetection code.
  224.  
  225. * The VDISK method of allocating extended memory is supported.  The
  226.   INT 15h method is also.  When the extender runs out of conventional and
  227.   extended memory, it uses a paging file named $(GO32TMP)/pgXXXXXX.386, where
  228.   XXXX is an unspecified hex value.  This file is normally removed on exit.
  229.  
  230. * Up to 128 MB of physical memory and 128 MB of disk swap space are allowed.
  231.   A 512K machine is sufficient, but very slow due to paging.
  232.  
  233. * The utilies support the MS-DOS standard response file method for giving
  234.   more than 128 bytes of command line.  Example: "gcc -o foo @foo.lnk" where
  235.   foo.lnk contains a list of .o files.  Wildcard expansion (globbing) is
  236.   performed on the parameters, unless they are surrounded by single quotes.
  237.   Double quotes can be used to prevent spaces from separating arguments.
  238.   Also supported is the GNUish-DOS method of passing arguments in
  239.   environment variables.
  240.  
  241. * Since MS-DOS does not distinguish case in file names, some .h files
  242.   used for C++ have had underscores prepended to them to avoid conflict
  243.   (ie: String.h conflicts with string.h, so it became _String.h).
  244.  
  245. * The extender can be added to any gcc-compiled program by copying go32.exe
  246.   to be <program>.exe, where <program> is the 32-bit program.  For example,
  247.   if "hello" is a gcc-compiled a.out file, and "hello.exe" is a copy of
  248.   go32.exe, then when "hello.exe" runs, it loads the file called "hello"
  249.   in the same directory, and executes it if present.  Otherwise,
  250.   the first parameter is the executable (ie: go32 cc1plus foo.cc).
  251.  
  252. * The extender can be merged to create one .exe file that is the extender
  253.   and the executable in one file, by using the stub.exe program:
  254.       copy /b stub.exe+myprog myprog.exe
  255.        -or-
  256.       aout2exe myprog
  257.   This will only work if go32.exe is in your search path, because stub.exe
  258.   runs it.  Alternatively, you can prepend go32.exe itself to an a.out file
  259.   to get a single executable (stub.exe is much smaller).  Note that if
  260.   you re-compile go32 or stub, you must strip off the symbol table first. 
  261.   Also note that aout2exe is designed to align the executable image for
  262.   better performance, so aout2exe'd programs will run faster than those
  263.   built with copy /b.
  264.  
  265. * The extender runs programs at logical address 0.  A copy of the first
  266.   1 MB of physical memory (including the AT channel) is mapped to
  267.   0xE0000000 in the program's address space.  The stack grows down from
  268.   0x7FFFFFFC in the program's address space.  Data usually starts at
  269.   0x00400000.  These numbers may be different under DPMI.
  270.  
  271. * The paging mechanism understands how SuperVGA's map their memory onto
  272.   the AT bus and automatically swaps pages as the program tries to
  273.   access them.  The program sees a linear range from 0xD0000000 to
  274.   0xD0100000 that corresponds to each pixel in the 256-color modes
  275.   of SuperVGAs.  To use this feature, you'll have to set the GO32
  276.   environment variable like this:
  277.     C>set go32=driver c:\djgpp\drivers\tseng4k.grd gw 640 gh 480 tw 132 th 43
  278.   These parameter pairs can be omitted or rearranged as needed.  They are
  279.   the "driver" name, default graphics width and height, and default
  280.   text width and height. Libgr.a doesn't have to be recompiled, nor
  281.   do graphics programs, when a different graphics mode is selected
  282.   (the extender handles it).  It is strongly recommended that the program
  283.   use the GR_default_graphics and GR_default_text modes to switch to
  284.   graphics or text.  These modes use the parameters specified by the
  285.   GO32 environment variable, allowing the user to select a favorite
  286.   graphics and text mode.
  287.  
  288. * Symbols are stored in virtual memory, so you won't run out of symbol
  289.   space until both extended memory and the disk are all used up.  For
  290.   large programs, you might notice a slight delay while it looks up
  291.   symbols.  Programs with a lot of lines in a given module may run out
  292.   of memory as the line number table is built in real memory and transferred
  293.   to virtual memory.
  294.  
  295. * Signals are not reported to the program.  However, interrupts do continue
  296.   to get serviced while in protected mode (ie: keypress, timer, etc).
  297.   CTRL-C will get you back to the debugger in debug32, and you can continue
  298.   from where you stopped.  All signals (ie: exceptions) cause debugging
  299.   traps in debug32, or general faults in go32.
  300.  
  301.  
  302.  
  303. Copyright Information:
  304.  
  305. * Source code for the GNU utilities is copyright (c) Free Software Foundation.
  306.   For more information on the FSF copyright, see their source code or write
  307.   Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  308.  
  309.   A copy of their file "COPYING" is included in the docs directory.  Some of
  310.   the FSF source code has been modified to operate properly in the MS-DOS
  311.   environment.
  312.  
  313. * Source code for most of libc.a are copyright (c) Regents of the University
  314.   of California.  These files include copyright information in them.  The
  315.   utilities are compiled against these libraries, and thus contain software
  316.   developed by the University of California, Berkeley, and its contributors.
  317.   Some of the BSD source code has been modified to operate properly in the
  318.   MS-DOS environment.
  319.  
  320. * Any sources not falling under the copyrights of FSF or UCB (as above) are
  321.   Copyright (c) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954.
  322.   To contact me via E-Mail, sent to "dj@ctron.com".  Cabletron Systems Inc
  323.   is in no way involved with this project; I just happen to work for them
  324.   during the day.
  325.  
  326. Terms and Conditions:
  327.  
  328. * Source code copyright FSF is distributed under the terms of the GNU
  329.   Public General License.  See the file "COPYING" in doc.arc for more
  330.   information.  If your program links in object modules (in libc.a) that
  331.   are compiled from GNU sources, then your entire program must be
  332.   distributed under the terms of the GNU GPL as a "derived work".  These
  333.   modules are the C++ class library (including the streams classes) and
  334.   obstacks, and are restricted to the libgpl.a lbrary.  The sources in
  335.   libsrc have the copyright notices in them for the various modules.
  336.  
  337. * Source code copyright UCB is distributed under the terms listed in the
  338.   UCB source code itself.
  339.  
  340. * Source code copyright DJ Delorie is distributed under the terms of
  341.   the file "copying.dj".
  342.  
  343. * Changes to source code copyright BSD or FSF are copyright DJ Delorie, but
  344.   fall under the terms of the original copyright.
  345.  
  346.  
  347.  
  348.  
  349.  
  350. Donations may be made to any of the following:
  351.  
  352.     DJ Delorie
  353.     24 Kirsten Ave
  354.     Rochester, NH  03867-2954
  355.     USA
  356.  
  357.     Free Software Foundation
  358.     675 Mass Ave
  359.     Cambridge, MA  02139
  360.     USA
  361.  
  362.     Computer Systems Research Group
  363.     Computer Science Division, EECS
  364.     University of California
  365.     Berkeley, California  94720
  366.     USA
  367.