home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / BC_DICE3.DMS / in.adf / DOC / dice_commands.doc < prev    next >
Encoding:
Text File  |  1995-01-09  |  67.2 KB  |  1,695 lines

  1. dice/CommandSummary                                      dice/CommandSummary
  2.  
  3.         * = Included in MiniDice
  4.  
  5.     Command    : Purpose
  6.     ===========+=========================================================
  7.     ame       : Advanced MicroEmacs text editor.
  8.     -----------+---------------------------------------------------------
  9.     bintohex   : Convert binary files to Motorola S-records or Intel Hex
  10.            : Dumps.  Used for programming ROM chips.
  11.     -----------+---------------------------------------------------------
  12.     cat       : Shows contents of text files (takes wild cards)
  13.     -----------+---------------------------------------------------------
  14.     ci       : Check in RCS Source (RCS).
  15.     -----------+---------------------------------------------------------
  16.     co       : Check out RCS Source (RCS).
  17.     -----------+---------------------------------------------------------
  18.     *das       : DICE Assembler.
  19.     -----------+---------------------------------------------------------
  20.     *dc1       : DICE Compiler.
  21.     -----------+---------------------------------------------------------
  22.     *dcc       : DICE Compiler Front End.
  23.     -----------+---------------------------------------------------------
  24.     *dcpp       : DICE Preprocessor.
  25.     -----------+---------------------------------------------------------
  26.     dd       : DICE Debugger.
  27.     -----------+---------------------------------------------------------
  28.     *DICEHelp  : Fast online help utility.    Integrates with any editor.
  29.     -----------+---------------------------------------------------------
  30.     diff,       : File compare utility, three-way file compare utility
  31.     diff3       : (RCS).
  32.     -----------+---------------------------------------------------------
  33.     *dlink       : DICE Linker.
  34.     -----------+---------------------------------------------------------
  35.     *dmake       : DICE Make Utility. Automates compiles.
  36.     -----------+---------------------------------------------------------
  37.     *dme       : Text editor.
  38.     -----------+---------------------------------------------------------
  39.     dobj       : Disassembles object & executable files.
  40.     -----------+---------------------------------------------------------
  41.     dprof       : Code profiler.  Helps optimize code for speed.
  42.     -----------+---------------------------------------------------------
  43.     dsearch    : Search for a string in a File.
  44.     -----------+---------------------------------------------------------
  45.     du       : Determine Disk space Usage.
  46.     -----------+---------------------------------------------------------
  47.     dupdate    : Distribution Maker.
  48.     -----------+---------------------------------------------------------
  49.     expand       : Expand Wild cards to stdout with formatting.
  50.     -----------+---------------------------------------------------------
  51.     fdtolib    : Creates Link Libraries from standard .FD files.
  52.     -----------+---------------------------------------------------------
  53.     fdtopragma : Converts standard .FD files into
  54.     -----------+---------------------------------------------------------
  55.     flush       : Flush libraries, etc. out of memory.
  56.     -----------+---------------------------------------------------------
  57.     head       : Display first few lines of a file.
  58.     -----------+---------------------------------------------------------
  59.     hunks       : Show internal structure of object or executable files.
  60.     -----------+---------------------------------------------------------
  61.     ident       : Identify files (RCS).
  62.     -----------+---------------------------------------------------------
  63.     istrip       : Strip Comments from include files.
  64.     -----------+---------------------------------------------------------
  65.     lbmake       : Link Library Creation Utility.
  66.     -----------+---------------------------------------------------------
  67.     libtos       : Convert Large-Data Amiga.lib to Small-Data version.
  68.     -----------+---------------------------------------------------------
  69.     loadabs    : For creating ROM images located at a specific address.
  70.     -----------+---------------------------------------------------------
  71.     loadfile   : Load & hold a file in memory.
  72.     -----------+---------------------------------------------------------
  73.     *makeindex : Create an index file for use by DICEHelp.
  74.     -----------+---------------------------------------------------------
  75.     *makeproto : Create a file containing function prototypes for your
  76.            : code.
  77.     -----------+---------------------------------------------------------
  78.     merge       : Three Way File Merge (RCS).
  79.     -----------+---------------------------------------------------------
  80.     rcs       : Change RCS File Attributes (RCS).
  81.     -----------+---------------------------------------------------------
  82.     rcsclean   : Clean up RCS Working Files (RCS).
  83.     -----------+---------------------------------------------------------
  84.     rcsdiff    : Compare RCS Revisions (RCS).
  85.     -----------+---------------------------------------------------------
  86.     rcsmerge   : Merge RCS Revisions (RCS).
  87.     -----------+---------------------------------------------------------
  88.     rlog       : Display RCS History (RCS).
  89.     -----------+---------------------------------------------------------
  90.     romable    : Generate romable image.
  91.     -----------+---------------------------------------------------------
  92.     touch       : Update a file's datestamp without changing the file.
  93.     -----------+---------------------------------------------------------
  94.     ttxsame    : Used by integrated error scripts to start TurboText.
  95.     -----------+---------------------------------------------------------
  96.     *VMake       : Visual Make program.  A front-end for the compiler.
  97.     -----------+---------------------------------------------------------
  98.     *VOpts       : Visual Options.  Usually invoked from within VMake.
  99.     -----------+---------------------------------------------------------
  100.     *wbrun       : Used to simulate starting a program from Workbench.
  101.     -----------+---------------------------------------------------------
  102.     wc       : Count words, lines, etc. in a file.
  103.     -----------+---------------------------------------------------------
  104.  
  105. dice/das                                                            dice/das
  106.  
  107.     FUNCTION
  108.     DICE Assembler
  109.  
  110.     SYNOPSIS
  111.     DAS asmfile [-o objectfile] [-E errorfile] [-nu]
  112.  
  113.     DESCRIPTION
  114.     Das is a minimal 68000 assembler designed to assemble the output of
  115.     dc1.
  116.  
  117.     || NOTE: Das should not be used for assembly projects, it is meant
  118.     || solely to deal with the output from the compiler.  Das supports
  119.     || only a minimal subset of features.
  120.  
  121.  -o objfile
  122.         Specify object file, else writes to asmfile.o.
  123.  
  124.  -E errorfile
  125.         Specify file for errors, else diagnostics are sent to stderr.
  126.  
  127.        -nu  Specify that HUNK_UNIT hunks have no name.    This option is used
  128.         for creating link libraries, to make the library smaller)
  129.  
  130.     SEE ALSO
  131.     Chapter .
  132.  
  133. dice/dc1                                                            dice/dc1
  134.  
  135.     FUNCTION
  136.     DICE Compiler
  137.  
  138.     SYNOPSIS
  139.     DC1 cppd_src_file [-o outfile] options
  140.  
  141.     DESCRIPTION
  142.     DC1 is the compiler itself.  As input it requires a file preprocessed
  143.     by dcpp, and as output it provides assembly code ready for the das
  144.     assembler.  Normally one uses either dcc or VMake as a front end,
  145.     never directly invoking dc1.
  146.  
  147.     The compiler generates absolute-data references and absolute code
  148.     references by default.    Do not confuse this with DCC's default, which
  149.     is small-data and small-code.
  150.  
  151.     The compiler will put argument and auto variables into registers
  152.     according to register availability and usage.  It will use
  153.     A0-A1/D0-D1 for register variables whenever possible.  Consequently,
  154.     the most heavily used variables will be in registers even for very
  155.     large subroutines.
  156.  
  157.     You should get into the habit of declaring automatic variables within
  158.     sub blocks rather than declaring all your autos at the top of the
  159.     procedure. Apart from making the code more modular, this will enable
  160.     the compiler to make better decisions when allocating register
  161.     variables.
  162.  
  163.     DCC does not do any major contents tracking and redundant
  164.     instructions will be generated.  DAS will handle properly optimizing
  165.     branches and DAS has a peephole optimizer built in it to handle other
  166.     obvious redundancies. The compiler does some optimizations itself,
  167.     such as using bit instructions to handle special cases of &, |, and
  168.     ^, include using BTST.
  169.  
  170.     || NOTE: volatile forces a data item NOT to be placed in a register.
  171.     || register is treated as a hint only by the compiler.    const is
  172.     || ignored by default but will force objects into the code section
  173.     || given the -ms or -mS options (see below). Other type and storage
  174.     || qualifiers are described in chapter .
  175.  
  176.     -S
  177. -S0  Set alternate section names "libdata" and "libbss".
  178.  
  179.   -Sd name  Set section name for data sections
  180.  
  181.   -Sb name  Set section name for bss sections
  182.  
  183.   -Sc name  Set section name for code sections
  184.  
  185.   -SD name  Set section name for __far data sections
  186.  
  187.   -SB name  Set section name for __far bss sections
  188.  
  189.         The -S option allows you to modify the default section naming
  190.         conventions.  DICE uses data, text, and bss as defaults for the
  191.         data, code, and bss sections.
  192.  
  193.         The DICE c.lib is compiled with -S and the startup code (c.o)
  194.         references these first to force c.lib's data to come before
  195.         program data.  The data ordering is then as follows:
  196.  
  197.     1) Library Initialized Data
  198.  
  199.     2) Program Initialized Data
  200.  
  201.     3) Library BSS Space
  202.  
  203.     4) Program BSS Space
  204.  
  205.     As long as the program does not declare more than 64KBytes of
  206.     initialized data it can be linked with the small-data model c.lib.
  207.     Thus, large-data-model programs that declare more than 64KBytes of
  208.     BSS space will still link with the small-data-model c.lib
  209.  
  210.     This may be of no consequence because any __far declared data will be
  211.     placed in a different data segment entirely.  Simply declare your
  212.     large arrays as __far and the rest may remain small-data
  213.  
  214.      -d[#]  Set debug mode.  This isn't pretty, it is primarily used for
  215.         diagnosing potential compiler problems.
  216.  
  217.    -E file  specify stderr file, any errors are appended to the file instead
  218.         of to stdout. Useful for batch compiles
  219.  
  220.     -R  Tells the compile to remove (delete) the input file when it no
  221.         longer needs it.  The input file is usually a temporary
  222.         preprocessor file and DCC will use this option to get DC1 to
  223.         delete it as soon as possible.
  224.  
  225.     -proto  The main compiler will generate errors for any unprototyped
  226.         function call.
  227.  
  228.     -r  Resident option.  The main compiler will generate special
  229.         autoinit code to initialize data-data relocations.    This
  230.         simplifies the work that DLink and the startup module must do to
  231.         support residentable programs.
  232.  
  233.     -v  Verbose
  234.  
  235.  -o outfile
  236.         Specify assembly output file name
  237.  
  238.        -mc  Small-code model (DCC default)
  239.  
  240.        -mC  Large-code model (DC1 default)
  241.  
  242.        -md  Small-data model (DCC default)
  243.  
  244.        -mD  Large-data model (DC1 default)
  245.  
  246.        -mw  Absolute-word addressing (overrides -md/-mD)
  247.  
  248.        -ma  Absolute addressing (no effect on DC1 operation)
  249.  
  250.         These options specify the memory model.  The small-code model
  251.         uses PC-relative addressing and the small-data model uses
  252.         A4-relative addressing
  253.  
  254.         -mw is used when making ROMable code and specifies that the
  255.         ABSOLUTE WORD addressing mode be used instead of either absolute
  256.         long or A4-relative.  Absolute word addresses are resolved at
  257.         link time.
  258.  
  259.         || NOTE: This option should not be used when generating
  260.         || executables meant to run on the Amiga.
  261.  
  262.       -ms0  (default) const is ignored
  263.  
  264.        -ms  string constants and const objs placed in code section
  265.  
  266.        -mS  string constants and const objs placed in code section
  267.  
  268.         These options control how const data items are handled, including
  269.         string constants such as char *ptr = "abcd"; The default is to
  270.         ignore the const type qualifier.
  271.  
  272.         If -ms is specified string constants and const data items are
  273.         placed in the code section.  Local references to const data items
  274.         use PC-RELATIVE addressing.  Remote references (from other
  275.         modules) to const data items use ABSOLUTE LONG addressing.
  276.  
  277.         -mS works the same as -ms but remote references are forced to use
  278.         PC-RELATIVE addressing.
  279.  
  280.         || NOTE: This can be dangerous and the final CODE size MUST BE
  281.         || LESS THAN 32KBYTES!
  282.  
  283.         Usually it is safe to use -ms and, in fact, can save a lot of
  284.         memory when combined with -r residentable programs because the
  285.         string constants will not be duplicated for each running instance
  286.         of the program.
  287.  
  288.     SEE ALSO
  289.     dcc, dcpp, dlink
  290.  
  291. dice/dcc                                                            dice/dcc
  292.  
  293.     FUNCTION
  294.     DICE Compiler Front End
  295.  
  296.     SYNOPSIS
  297.     dcc options file file ...
  298.  
  299.     DESCRIPTION
  300.     Dcc is the normal method of using the DICE system from a CLI window.
  301.     Dcc automatically invokes all the other parts of DICE, relieving you
  302.     of learning the grimy details.    Dcc is similar to the UNIX cc
  303.     command.  Many users will prefer to use VMake, the visual interface
  304.     to DICE. See chapter for full documentation.
  305.  
  306.     Dcc options may occur anywhere on the command line but MUST occur
  307.     singly. That is, -c -a instead of -ca.    file arguments to options may
  308.     occur with or without an intervening space.  -oFILE and -o FILE are
  309.     both legal.
  310.  
  311.     Files ending in .a or .asm are assumed to be assembly files.  Files
  312.     ending in .l or .lib are assumed to be library files.  Files ending
  313.     in .o or .obj are assumed to be object files.  All other files are
  314.     assumed to be C source files.
  315.  
  316.     Normally DCC compiles all C source files, assembles all asm files,
  317.     and links the resulting object files with any specified .o files
  318.     together to produce an executable.  The output file may optionally be
  319.     specified with the -o option.  If not specified, a default output
  320.     filename based on the name of the input file is generated.  This
  321.     general action is modified by two options:
  322.  
  323.     -c  DCC does NOT link, -o specifies the output object file
  324.  
  325.     -a  DCC does NOT assemble (i.e.  leaves the .a file resulting from a
  326.         compile).  -o specifies the output assembly file
  327.  
  328.         If neither option is given -o specifies the name of the resulting
  329.         executable.
  330.  
  331.         The default object directory is T: and may be changed with the -O
  332.         option.  The default temporary directory is also T: and may be
  333.         changed with the -T option.  IF YOU HAVE LIMITED MEMORY you may
  334.         have to specify that temporary files not be placed in T: either
  335.         by re-assigning T: or using the -T option.    DICE goes much slower
  336.         if temporary files must be written to a floppy or even a hard
  337.         disk.
  338.  
  339.         ## WARNING: asm files are assembled with DAS, See the assembler
  340.         ## reference if you intend to assemble non-DC1 generated assembly
  341.  
  342.       file  File to compile, assemble (.a), and/or link (.o, .lib)
  343.  
  344.     @@file  containing further list of files, one per line.  (blank lines and
  345.         lines beginning with ';' or '#' are ignored.  File may NOT
  346.         contain further options).
  347.  
  348.    -E file  specify stderr file, any errors are appended to file instead of
  349.         to stdout.    Useful for batch compiles
  350.  
  351.     -c  Compile C source files and assemble into OBJECT files only (do
  352.         not link).
  353.  
  354.     -a  Compile C source files into ASSEMBLY files (do not assemble or
  355.         link).
  356.  
  357.         Keep in mind the DAS will do further optimizations on the
  358.         assembly file that you see.
  359.  
  360.        -l0  Skip linking default libraries (dlib:c.lib dlib:amigas.lib
  361.         dlib:auto.lib), or standard startup (dlib:c.o and dlib:x.o).
  362.  
  363.         :: Beginner's Note: Do not use this option
  364.  
  365.         This option is used in special circumstances, such as when
  366.         generating .libraries or .devices.
  367.  
  368.         ## WARNING: DICE is much more dependent on its startup code (c.o
  369.         ## and x.o) than other compilers, do not link without the startup
  370.         ## unless you know what you are doing.
  371.  
  372.     -l lib  Include this library when linking.    (space is optional)
  373.  
  374.         :: Beginner's Note: Use -lm to link with the math library.  The
  375.         :: math library is required before functions such as printf will
  376.         :: work with floating point.
  377.  
  378.         See chapter   for more information on linking in custom
  379.         libraries.
  380.  
  381.  -3.0  -2.0  -1.3
  382.         Set the compiler to look for libraries and includes in the proper
  383.         place.  Libraries and includes are different for each operating
  384.         system release.  DICE eases compiling for, or using, different OS
  385.         versions.  DICE inserts the revision number into library names
  386.         ("amigas30.lib") and the include file path ("dinclude:amiga30/").
  387.  
  388.  -3.x  -2.x  -1.x
  389.         Like the above options, except x specifies a specific minor OS
  390.         revision.
  391.  
  392.        -L0  remove default library search path, including all explicitly
  393.         specified (-L dir) directories up to this point.
  394.  
  395.     -L dir  add the specified directory to the library search path.  If the
  396.         object module or library can not be found in the current
  397.         directory, directories specified with -L are searched.  -L
  398.         directories are searched before the default library directory
  399.         (DLIB:), assuming it was not removed with -L0 .
  400.  
  401.         Note that the directory path specified by -L is used to search
  402.         for libraries AND object modules.
  403.  
  404.         A trailing '/' is optional
  405.  
  406.        -I0  Remove default include path from search list.  The default
  407.         include path is dinclude: and dinclude:amiga/ (unless modified by
  408.         -1.x and -2.x options)
  409.  
  410.     -I dir  When compiling scan this include directory (space is optional)
  411.         The specified path takes precedence over defaults but defaults
  412.         are NOT removed.
  413.  
  414.  -D define[=value]
  415.         Pre-define a symbol
  416.  
  417.     -U  Undefine __STDC__, mc68000, _DCC, and AMIGA.
  418.  
  419.         :: Beginner's Note: Do not use any of these options
  420.  
  421.  -Houtfile=headerfile
  422.         This option enables precompiled header file generation and
  423.         operation. You may specify any number of -H options.  Example
  424.         usage:
  425.  
  426.         -Ht:defs.m=defs.h
  427.  
  428.         When DICE encounters an #include <defs.h> this will cause it to
  429.         first check for the existence of T:DEFS.M ...  if T:DEFS.M does
  430.         not exist DICE will generate it from <defs.h>.  if T:DEFS.M does
  431.         exist then DICE will use it directly and ignore <defs.h>
  432.  
  433.         You must specify the -H option both to have DICE create the
  434.         precompiled header file and to have DICE use the precompiled
  435.         header file.  Normally one makes operation as transparent as
  436.         possible so as not depend on the option existing when porting to
  437.         other environments.
  438.  
  439.         ## WARNING: A precompiled header file contains the preprocessed
  440.         ## header and preprocessor macros.    These are set in stone!
  441.  
  442.         If you modify a #define that would normally effect preprocessing
  443.         of a header file which is precompiled THE EFFECT WILL NOT OCCUR.
  444.         It is strongly suggested you use precompiled headers ONLY with
  445.         includes that are pretty much unchanging.  For example, the
  446.         commodore includes or otherwise have an appropriate dependency in
  447.         your DMakefile or make script to delete the precompiled header
  448.         file whenever any of your headers are modified.
  449.  
  450.         Normally one has a single -H option that enables precompiling of
  451.         a local header file, say defs.h, which contains #include's of all
  452.         other header files.  Source modules would then #include <defs.h>
  453.  
  454.         :: Beginner's Note: Do not use this option
  455.  
  456.    -o file  Specify output executable, object, or assembly file name
  457.         depending on what you are producing.  The space is optional
  458.  
  459.       -020  Generate code for the 68020 and later microprocessors
  460.  
  461.       -030  Generate code for the 68030 and later microprocessors
  462.  
  463.       -881  Generate inline FFP code for the 68881
  464.  
  465.       -882  Generate inline FFP code for the 68882
  466.  
  467.         :: Beginner's Note: Do not use any of these options
  468.  
  469.         These options exist to produce 020 and 030 opcodes, and 881/882
  470.         inline assembly for floating point operations.
  471.  
  472.        -md  small data model (default) uses A4-relative
  473.  
  474.        -mD  large data model uses absolute-long
  475.  
  476.        -mc  small code model (default) uses PC-relative
  477.  
  478.        -mC  large code model uses absolute-long
  479.  
  480.         :: Beginner's Note: Use only -mD if you declare more than
  481.         :: 64KBytes of data.
  482.  
  483.         These options specify the default data and code model to use.
  484.         The model may be overridden by use of the __near and __far type
  485.         qualifiers on a variable by variable basis.
  486.  
  487.         DICE defaults to the small data and small code model, and is able
  488.         to generate >32KBytes of code using the small code model so you
  489.         should never have to use -mC.  Note that the DICE libraries have
  490.         all been compiled with the small-data model, and certain
  491.         applications may disrupt the base register, A4...  in this case
  492.         use of the __geta4 type qualifier should be of use.  If worse
  493.         comes to worse you can recompile a large-data model c.lib, but I
  494.         suggest you try other solutions first.
  495.  
  496.       -ms0  (default), Only const objects are put into a CODE hunk
  497.  
  498.        -ms  String constants are put into the read-only code hunk
  499.  
  500.        -mS  String constants are put into the read-only code hunk AND all
  501.         external const references use NEAR addressing
  502.  
  503.         :: Beginner's Note: Use only -ms
  504.  
  505.         -ms0 turns off -ms/-mS in case you have it in your DCCOPTS
  506.         environment variable and want to turn it off.
  507.  
  508.         Default operation (no -ms or -mS) puts const items into a
  509.         read-only CODE hunk.  Locally declared objects are referenced
  510.         using PC-REL while external objects (declared in some other
  511.         module) are referenced using 32-BIT ABSOLUTE addressing.
  512.  
  513.         -ms will additionally make all string constants, such as "fubar",
  514.         const and referenced via PC-REL.  -ms is an extremely useful
  515.         option when you will never modify any of your string constants
  516.         because the strings are not copied for multiple running instances
  517.         of the program (if resident).
  518.  
  519.         -mS works like -ms, but in addition forces all external const
  520.         references to use PC-REL addressing INSTEAD of 32-bit absolute
  521.         addressing.
  522.  
  523.         || NOTE: This is a very dangerous option, do not use unless the
  524.         || final code size is less than 32 kbytes.
  525.  
  526.         Using -ms along with -r can result in huge savings of memory due
  527.         to the string constants being moved out of the data segment
  528.         (which must be duplicated for each running instance of the
  529.         program).
  530.  
  531.         ## WARNING: In all cases if you declare an object as const it
  532.         ## must be extern'd as const in other modules or incorrect code
  533.         ## will be generated.  This is true whether you use -ms/S or not.
  534.  
  535.       -mRR  registered arguments, strict
  536.  
  537.         This option controls the automatic registerization of procedure
  538.         arguments.    Only those prototyped procedures declaring 4 or fewer
  539.         arguments will be registered.  Values are passed in D0/D1/A0/A1
  540.         according to the type of variable and availability of registers.
  541.  
  542.         -mRR generates a single registerized entry point and extends
  543.         registerization to indirect function calls (that must be fully
  544.         prototyped).
  545.  
  546.         -mRR assigns either the registered or normal entry point to
  547.         function pointers depending on whether they are prototyped or not
  548.         (and any calls made through these function pointers will use the
  549.         registered args method).
  550.  
  551.         ## WARNING: -mR cannot be used if you make c.lib calls that take
  552.         ## call-back functions as arguments.
  553.  
  554.         -mr and -mRR CAN be used, however with -mRR you must be careful
  555.         to supply the registered entry point.
  556.  
  557.         ## WARNING: AMIGA.LIB routines that take call-back functions as
  558.         ## arguments must be given non-registered entry points.
  559.  
  560.         Thus if you use -mRR you MUST qualify the procedure or function
  561.         pointer type specification with __stkargs to entire it has a
  562.         normal entry point.
  563.  
  564.   -mw addr  Used for making romable executables, Do not use to create AMIGA
  565.         executables
  566.  
  567.         :: Beginner's Note: Do not use this option
  568.  
  569.         This option is another data model, called the ABSOLUTE-WORD data
  570.         model.  Source files compiled with this option generate
  571.         absolute-word data references to access data objects instead of
  572.         A4-relative or absolute-long.  The base of the data segment must
  573.         be specified as decimal, 0octal, or 0xHEX.
  574.  
  575.         Since absolute-word is used exclusive of A4-relative, the
  576.         compiler will now use A4 for register variables.  You may NOT mix
  577.         -mw modules with small-data models.
  578.  
  579.         The ROMABLE program is usually run on the executable generated by
  580.         DLink to generate a ROM.
  581.  
  582.   -ma addr  Used for making romable executables, do not use to create Amiga
  583.         executables
  584.  
  585.         :: Beginner's Note: Do not use this option
  586.  
  587.         This option specifies to the compiler and linker that the
  588.         resulting code is intended to be relocated to a permanent data
  589.         address, that specified by addr in decimal, 0octal, of 0xHEX.
  590.  
  591.         Unlike -mw, -ma assumes that the data segment can be placed
  592.         anywhere.  The ROMABLE program is usually run on the executable
  593.         generated by DLink to generate a ROM.
  594.  
  595.         You may still specify a data model, -md or -mD, to Be with this
  596.         option.  Unlike -mw, -ma does NOT touch the A4 register and thus
  597.         may be mixed with the small-data model.  See the section on
  598.         generating Romable code.
  599.  
  600.       -rom  Set up options for generating romable code
  601.  
  602.         :: Beginner's Note: Do not use this option
  603.  
  604.         Like -l0, -rom disables automatic inclusion of a startup file
  605.         (you must specify your own) and libraries.    However, x.o is still
  606.         included to sink any autoinit code.  Your startup code must
  607.         handle the appropriate model and call autoinit code before
  608.         calling your program main
  609.  
  610.         This option is used to support ROMed firmware, i.e.  non-Amiga
  611.         executables.  You should never link with c.lib.  Instead, a new
  612.         library, rom.lib, is available.
  613.  
  614.         rom.lib contains no static or global references and thus works
  615.         with any data model, and only completely self-contained routines
  616.         are included.  The only data rom.lib uses is stack-based.  All
  617.         rom.lib routines are completely reentrant, including [v]sprintf()
  618.         !
  619.  
  620.     -proto  Prototype checking and optimizations
  621.  
  622.         When this option is used, an ERROR message will be generated for
  623.         any call that is not prototyped.  This option is useful to ensure
  624.         that you have properly prototyped routines (when you use
  625.         prototypes), especially when floats and doubles are passed and
  626.         indirect function pointers are used (they must be prototyped as
  627.         well!).
  628.  
  629.         In the future this will enable stack-argument optimization.
  630.         Currently, chars and shorts are extended to long's when pushed
  631.         onto the stack for a subroutine call.  In the future if the
  632.         -proto option is used these objects will be pushed as shorts and
  633.         not extended.
  634.  
  635.      -prof  enable profiling for source modules
  636.  
  637.     -prof1  same as -prof
  638.  
  639.     -prof2  enable profiling for source modules and c*p.lib
  640.  
  641.     -prof3  enable profiling for source mods, c*p.lib, and amiga*p.lib
  642.  
  643.         Enable profiling.  You may compile some or all your source
  644.         modules with profiling enabled.  Any -prof* option will enable
  645.         profiling for compiled source modules.  -prof2 will cause DCC to
  646.         link with a profiled c*p.lib while -prof3 will cause DCC to link
  647.         with a profiled c*p.lib and amiga*p.lib (the ultimate).
  648.  
  649.         To profile c*.lib and/or amiga*.lib functions the equivalent
  650.         c*p.lib and amiga*p.lib must exist.  These libraries are most
  651.         likely lharc'd in DCC2:dlib/ or DCC3:dlib/ but if not, registered
  652.         users may create any link library from the library source.
  653.  
  654.     -r  Make executable residentable with separate CODE & DATA hunks
  655.  
  656.        -pr  Make executable residentable w/ no relocation hunks
  657.  
  658.        -pi  Make executable NON-residentable w/ no relocation hunks
  659.  
  660.         :: Beginner's Note: Just use -r to get residentable executables
  661.         :: and do not worry about these other options.
  662.  
  663.         -pr/-pi generate 'position independent' code also useful for
  664.         ROMed applications.  NOTE that -pi and -pr force const items to
  665.         be referenced pc-relative as well, causing -ms and -mS to do the
  666.         same thing (when combined with -pr/-pi)
  667.  
  668.         Code size is limited to 32k bytes when you use -pr or -pi
  669.  
  670.         Refer to the RESIDENTABILITY section in Chapter 5 for a
  671.         discussion of these options
  672.  
  673.         || NOTE: You may not make data references within const declared
  674.         || objects when using the -r/-pr options.
  675.  
  676.         This is because the CODE hunk is shared between running instances
  677.         of the program and these address references would be different
  678.         between the instances.
  679.  
  680.         However, if you are using the -ms option, string constants will
  681.         be in the code section and thus no problem.
  682.  
  683.  -O outdir  Specify directory that is to contain output executable, object,
  684.         or assembly files (used when specifying multiple source files)
  685.  
  686.         -O is useful to tell the compiler where to put the objects when
  687.         you use dcc to compile and link a whole bunch of files at once.
  688.         In this case, the -o option can still be used to specify where to
  689.         put the final executable.
  690.  
  691.         || NOTE: The -O name is used as a prefix so if you are specifying
  692.         || a directory be sure it has a ':' or '/' on the end.
  693.  
  694.     -R  If the compile resulted in errors or warnings, execute the ARexx
  695.         script specified in dcc:config/dcc.config.    This activates the
  696.         integrated error tracking features of DICE.
  697.  
  698.  -T tmpdir  Specify the temporary directory used to hold preprocessed source
  699.         files and temporary assembly files...  files that will be deleted
  700.         after use.
  701.  
  702.         || NOTE: The -T name is used as a prefix so if you are specifying
  703.         || a directory be sure it has a ':' or '/' on the end.
  704.  
  705.         The default is T:.    This option is useful in low-memory
  706.         situations where you may decide to put intermediate files
  707.         elsewhere.    Putting intermediate files on your hard disc or
  708.         floppy slows down compilation by an order of magnitude, but if
  709.         you are running on a system with little memory you may not have a
  710.         choice.
  711.  
  712.     -s  Include symbolic debugging information in the executable (dlink
  713.         option).
  714.  
  715.         This option includes the symbol table in the resulting executable
  716.         and is passed to dlink.  When using DOBJ to disassemble an
  717.         executable, DOBJ will use the symbol table to generate a more
  718.         symbolic dump.
  719.  
  720.     -S  Alternate section naming op for libraries
  721.  
  722.         When making libraries: uses alternate section naming conventions
  723.         so that all initialized data in the module will be placed before
  724.         any initialized data in non -S modules (i.e.  normal linked
  725.         object files).  Any library BSS will be placed before non-library
  726.         BSS.  Thus, the final ordering in the final executable will be:
  727.  
  728.         LIBDATA
  729.         PROGRAMDATA
  730.         LIBBSS
  731.         PROGRAMBSS
  732.  
  733.         Thus, if your program contains >64K Bytes of BSS you can still
  734.         link with a library that tries to reference its own BSS using the
  735.         small-data model.  If your library declares only initialized data
  736.         (i.e.  int x = 0; ), then you can link with the library even if
  737.         your program declares >64KBytes of *initialized* data !
  738.  
  739.     -v  Display commands as DCC executes them.
  740.  
  741.         -new Checks timestamps for source/destination and only
  742.         compiles/assembles if object is outdated or does not exist.  Used
  743.         to make DCC a standalone make.
  744.  
  745.     -f  Fast  CTRL-C handling for 1.3
  746.  
  747.         This option is used for 1.3 only.  You MUST be using the
  748.         Commodore shell (NewShell) and if you make programs resident you
  749.         MUST use the Commodore C:Resident command.
  750.  
  751.         This option will probably not work if you use WShell or ARPShell
  752.         under 1.3.    This option allows DICE to take short cuts to run
  753.         sub-programs and allows CTRL-C to be propagated to said programs.
  754.         This option is useful to set permanently in your DCCOPTS ENV:
  755.         variable if you run under 1.3.  DICE under 2.0 has no such
  756.         problems and will run sub programs optimally, including
  757.         propagation of ^C.
  758.  
  759.      -frag  FRAGment (linker option).
  760.  
  761.         Tell linker not to combine all code hunks together or combine all
  762.         data hunks together.  Cannot be used if the -r or -mw options are
  763.         used. Generally only useful if the large-data model is used.  Not
  764.         entirely supported yet.
  765.  
  766.       -ffp  Set fp library for floats
  767.  
  768.         :: Beginner's Note: When using single precision floating point
  769.         :: this option, use of the original ffp libraries, will make the
  770.         :: program portable across all Amigas.
  771.  
  772.         Otherwise only amigas that have the Commodore
  773.         MathIeeeSing*.library libraries will be able to run the program.
  774.  
  775.         If not specified, mathieeesingtrans.library and
  776.         mathieeesingbas.library are used.  These are new 2.0 libraries
  777.         that may not exist on all machines yet.
  778.  
  779.         If specified, mathtrans.library is used ..    Motorola's FFP float
  780.         library.
  781.  
  782.         || NOTE: IF -ffp is used, be warned that conversion from floats
  783.         || to doubles and back again is not entirely reliable.
  784.  
  785.        -d#  Set debugging level (# = a number), used for compiler diagnostics
  786.         only.
  787.  
  788.    -d opts  Specify any combination of debugging options.  These options may
  789.         be combined in one -d option.
  790.  
  791.         Currently no options are defined.
  792.  
  793.        -gs  Generate Dynamic Stack Code.  This generates code on every
  794.         subroutine call to check available stack.  If available stack
  795.         falls below 2K a new stack frame is allocated which will be
  796.         deallocated when the subroutine returns.
  797.  
  798.         If the allocation fails, stack_abort() is called.  If this
  799.         routine is not defined by you, the library stack_abort() will
  800.         call abort().
  801.  
  802.         This option is extremely useful when compiling UNIX code that
  803.         expects infinite stack.
  804.  
  805.      -chip  CHIP force (linker option).
  806.  
  807.         Tell linker to force all hunks into CHIP memory.  You should
  808.         generally not use this option.  Instead, use the __chip keyword
  809.         for those specific data items that need to be in CHIP memory.
  810.  
  811.         || NOTE: CHIP data items are accessed using the large-data model,
  812.         || thus you cannot create residentable executables that contain
  813.         || __chip declarations Unless they are also const objects --
  814.         || read-only.
  815.  
  816.      -unix  Causes DICE to use DLIB:uc*.lib instead of DLIB:c*.lib ...    the
  817.         uc*.lib is exactly the same as the normal c*.lib except that all
  818.         filenames are assumed to be UNIX names ..  that is, a beginning
  819.         slash is converted to ':' (root of the current volume), "./" is
  820.         ignored, and "../" is converted to "/" for all file accesses.
  821.  
  822.         This makes porting and usage of UNIX programs easier.
  823.  
  824.     -aztec  The front end attempts to run Aztec executables
  825.  
  826.  -sas  -lattice
  827.         Identical.    The front end attempts to run SAS/Lattice executables
  828.  
  829.         These options allow one to write a single DMakefile able to
  830.         handle compilation under any compiler, assuming the source is
  831.         compilable under any compiler.  These are very limited options
  832.         and may not work across new versions of Aztec or SAS/C
  833.  
  834.        -//  This option enables C++ style // comments.    This form of
  835.         commenting begins with a // causing it and the remainder of the
  836.         line to be considered a comment.
  837.  
  838.    -no-env  This option disables DCCOPTS.  DCC will not process options in
  839.         the DCCOPTS environment variable.
  840.  
  841.         The ENV:DCCOPTS environment variable may contain additional
  842.         options.
  843.  
  844.         ENV:must exist for DCC to run, even if you do not have a DCCOPTS
  845.         environment variable.  If you do not use ENV:,assign it to RAM:
  846.  
  847.         1> assign env: ram:
  848.  
  849.     EXAMPLES:
  850.     Example #1.  Compile hello.c to create executable "hello.":
  851.  
  852.     1> dcc hello.c
  853.     1> hello
  854.  
  855.     Example #2.  Compile hello.c to executable "fish" and put the object
  856.     file in X:
  857.  
  858.     1> dcc hello.c -o ram:fish -TX:
  859.  
  860.     Example #3.  Compile hello.c to and object file  in RAM, then link
  861.     with symbols:
  862.  
  863.     1> dcc -c hello.c -o ram:hello.o
  864.     1> dcc ram:hello.o -o ram:hello -s
  865.  
  866.     Example #4.  Compile foo.c and link with an already compiled object
  867.     file gar.o to produce an executable.  foo.o is placed in T:
  868.  
  869.     1> dcc foo.c gar.o -o ram:foogar
  870.  
  871.     SEE ALSO
  872.     das, dc1, dcpp, dlink
  873.  
  874. dice/dcpp                                                          dice/dcpp
  875.  
  876.     FUNCTION
  877.     DICE Preprocessor
  878.  
  879.     SYNOPSIS
  880.     dcpp sourcefile [-o outfile] [-I includedir ...] options
  881.  
  882.     DESCRIPTION
  883.     DCPP is a C preprocessor.  C code is first preprocessed, then
  884.     compiled.  The preprocessing step resolves all # operators, like
  885.     #define and #include, and generally prepares the C code for
  886.     compilation.  Most programmers use dcc or VMake, and do not invoke
  887.     dcpp directly.
  888.  
  889.     Dcpp automatically scans DINCLUDE:, DINCLUDE:PD/, and DINCLUDE:AMIGA/
  890.     .  Any -I option directories are searched in sequence BEFORE dcpp's
  891.     default search path. The last default directory, DINCLUDE:AMIGA/, may
  892.     be modified with the -1.3, -2.0 and -3.0 options.
  893.  
  894.     Note that DINCLUDE:PD/    is meant to be a place to put public domain
  895.     header files so as not to clutter the top level DINCLUDE: directory.
  896.  
  897.     As with all DCC commands, the space between the option and an
  898.     associated file/dir argument is optional.
  899.  
  900.     The following symbols are defined by default
  901.  
  902.     Symbol          : Type        : Usage
  903.     ==============+=============+=======================================
  904.     __LINE__      : integer     : Current line number.
  905.               : constant    :
  906.     --------------+-------------+---------------------------------------
  907.     __DATE__      : string        : Current date.
  908.     --------------+-------------+---------------------------------------
  909.     __TIME__      : string        : Current time.
  910.     --------------+-------------+---------------------------------------
  911.     __FILE__      : string        : Current file.
  912.     --------------+-------------+---------------------------------------
  913.     __BASE_FILE__ : string        : Base source file.  Allows an include
  914.               :         : file to know which C file included it
  915.     --------------+-------------+---------------------------------------
  916.     __STDC__      : boolean     : Indicates ANSI compiler.
  917.     --------------+-------------+---------------------------------------
  918.     mc68000       : integer     : Indicates Motorola CPU.
  919.               : constant    :
  920.     --------------+-------------+---------------------------------------
  921.     _DCC          : integer     : Indicates the DICE system.
  922.               : constant    :
  923.     --------------+-------------+---------------------------------------
  924.     AMIGA          : integer     : Everyone's favorite computer.
  925.               : constant    :
  926.     --------------+-------------+---------------------------------------
  927.     _FFP_FLOAT    : boolean     : Set if single precision floats are in
  928.               :         : Fast Floating Point format
  929.     --------------+-------------+---------------------------------------
  930.     _SP_FLOAT     : boolean     : Set if single precision floats are in
  931.               :         : IEEE-SING format (default).
  932.     --------------+-------------+---------------------------------------
  933.  
  934.  -1.x  -2.x  -3.x
  935.         Selects operating system revision compatibility for the
  936.         Preprocessor.  If not specified, DCPP searches dinclude:amiga for
  937.         amiga includes.  If specified, DCPP searches dinclude:amigaNN for
  938.         the includes.
  939.  
  940.         DCC supports this option and passes it along to dcpp.  This
  941.         allows developers to compile under any OS revision with the flick
  942.         of an option.  (Note: DCC also sets a different amiga.lib based
  943.         on these options).
  944.  
  945.      -d[#]  This option turns on DCPP debugging
  946.  
  947.     -ofile  This option sets the output file, otherwise stdout is used.
  948.  
  949.       -ffp  Passed from DCC, tells preprocessor to define _FFP_FLOAT.  If not
  950.         specified, preprocessor defines _SP_FLOAT.    This exists to better
  951.         support alternate floating point models in header files.
  952.  
  953.  -Dvar[=val]
  954.         This option predefines a symbol or macro.
  955.  
  956.    -E file  specify stderr file, any errors are appended to file instead of
  957.         to stdout.    Useful for batch compiles
  958.  
  959.     -U  This option undefines the following symbols:
  960.  
  961.         __STDC__ mc68000 _DCC AMIGA
  962.  
  963.  -Hprecomp=header
  964.         Enable use/creation of precompiled header files.  See chapter for
  965.         more information.
  966.  
  967.         -Ht:defs.m=defs.h
  968.  
  969.        -I0  This option causes DCPP to *NOT* include any default directories
  970.         in the include search list.
  971.  
  972.     -I dir  This option adds the specified directory to the include search
  973.         list.  A hanging slash on the end of the path is not required.
  974.         The space is optional.
  975.  
  976.        -//  Enable C++ style // comments.  The remainder of the line after //
  977.         is encountered is interpreted as a comment.  This differs from /*
  978.         style commenting in that no explicit comment-terminator is
  979.         required.
  980.  
  981.     -notri  Disable tri-graph scan pass.  Note that the tri-graph pass is
  982.         implemented in assembly and does not slow down preprocessing in
  983.         any noticeable fashion, you should not disable tri-graphs unless
  984.         you need to.
  985.  
  986.     SEE ALSO
  987.     dcc, dc1
  988.  
  989. dice/DICEHelp                                                  dice/DICEHelp
  990.  
  991.     FUNCTION
  992.     Fast Online Help Utility
  993.  
  994.     SYNOPSIS
  995.     DICEHelp searchitem
  996.  
  997.     DESCRIPTION
  998.     DICEHelp can quickly retrieve help on any DICE topic.  From a CLI,
  999.     simply type your request as above.  From the Workbench, just click on
  1000.     the DICEHelp icon.
  1001.  
  1002.     Within many text editors, "hotkeys" have been established to link
  1003.     with DICEHelp.    A key will either search for information on the word
  1004.     under the cursor, or bring up a box for your selection.  DICEHelp
  1005.     uses a "fuzzy" search, so your never have to worry about getting the
  1006.     correct case or suffix.
  1007.  
  1008.     SEE ALSO
  1009.     Chapter .
  1010.  
  1011. dice/dlink                                                        dice/dlink
  1012.  
  1013.     FUNCTION
  1014.     DICE Linker
  1015.  
  1016.     SYNOPSIS
  1017.     dlink options files libraries
  1018.  
  1019.     DESCRIPTION
  1020.     The final step in creating an Amiga program is linking.  Normally the
  1021.     linker is invoked as needed by dcc or VMake.
  1022.  
  1023.     Options may occur anywhere on the command lines.  Any file ending in
  1024.     .o or .obj is assumed to be an object file.  Any file ending in .l or
  1025.     .lib is assumed to be a library.  Any file name beginning with @@
  1026.     specifies a text file containing a further list of files.
  1027.  
  1028.     File ordering is maintained.  Section ordering is maintained.  All
  1029.     sections of the same name are coagulated together with ordering
  1030.     maintained.
  1031.  
  1032.     || NOTE: Inter-section ordering is not maintained within a library
  1033.     || since library modules are random included.  However, ordering is
  1034.     || maintained *between* libraries.
  1035.  
  1036.     All object files specified are included in the final executable.  All
  1037.     libraries specified are searched at the point they are specified
  1038.     (that is, specifying an object file that references a symbol defined
  1039.     in a library specified BEFORE the object file will cause an undefined
  1040.     symbol error).    Normally an object file is specified after a library
  1041.     to terminate an autoinit or autoexit section.
  1042.  
  1043.     You do not have to order object files within a library, DLink will
  1044.     automatically make as many passes as required to handle all internal
  1045.     library references.  However, ordering object files will make DLink
  1046.     go faster.
  1047.  
  1048.     Symbols defined in object files override symbols defined in
  1049.     libraries. Symbols defined in libraries specified before later
  1050.     libraries override symbols defined in later libraries.    Symbols
  1051.     defined in a library and also defined in a later specified object
  1052.     module causes an error. -o execname name of executable
  1053.  
  1054.     -s  Include symbolic information.
  1055.  
  1056.         || NOTE: if -r is used symbolic info for the data sections will
  1057.         || point to the statically init'd stuff, NOT The actual data
  1058.         || space (in BSS) referenced by the code.  This is a bug.
  1059.  
  1060.      -frag  Fragment output file (default is to coagulate all hunks of the
  1061.         same type regardless of name).  If frag is specified then only
  1062.         hunks of the same type AND name are coagulated.
  1063.  
  1064.         see fragmentation note at bottom
  1065.  
  1066.     -r[es]  Resident link.
  1067.  
  1068.        -pi  Position independent non-residentable (i.e.  only one copy of the
  1069.         data but also no relocation hunks)
  1070.  
  1071.         -pr residentable position independent
  1072.  
  1073.  -Ppostfix  specify library name postfix.  If DLink cannot find the library
  1074.         as specified it will append the postfix and try again.  Used by
  1075.         DCC to specify the memory model.
  1076.  
  1077.   -mw addr  specify absolute data base
  1078.  
  1079.   -ma addr  specify absolute data base
  1080.  
  1081.         Both options do exactly the same thing and are in duplicate to
  1082.         conform to DCC's options.
  1083.  
  1084.   -mw
  1085. -ma   specify the base of data as a decimal, 0octal, or 0xHEX address.
  1086.         You must use the -r option in conjunction with these options.
  1087.  
  1088.         DLink will resolve all Absolute-Word addresses but not all
  1089.         Absolute-Long addresses.  This is left up to the ROMABLE program
  1090.         which generates a raw binary image of the program that can then
  1091.         be transferred to an EPROM.
  1092.  
  1093.         || NOTE: Do not use this option when generating Amiga
  1094.         || executables.
  1095.  
  1096.      -d[#]  debug mode (spews lots of debugging junk out)
  1097.  
  1098.    -E file  specify stderr file, any errors are appended to the file instead
  1099.         of to stdout.  Useful for batch compiles
  1100.  
  1101.      -chip  chip-only - forces all hunks into CHIP memory
  1102.  
  1103.        -L0  remove default library search path, including all explicitly
  1104.         specified (-L dir) directories up to this point.
  1105.  
  1106.     -L dir  add the specified directory to the library search path.  If the
  1107.         object module or library can not be found in the current
  1108.         directory, directories specified with -L are searched.  -L
  1109.         directories are searched before the default library directory
  1110.         (DLIB:), assuming it was not removed with -L0 .
  1111.  
  1112.         Note that the directory path specified by -L is used to search
  1113.         for libraries AND object modules.
  1114.  
  1115.         A trailing '/' is optional
  1116.  
  1117.  -Ppostfix  This allows you to specify -lc -Ps and DLink will automatically
  1118.         look for cs.lib ...  you can specify a postfix that occurs before
  1119.         the .lib in the library name here.    If DLink cannot find the
  1120.         library as it is named by default it will try it with the
  1121.         postfix.
  1122.  
  1123.         DCC uses this to supply the memory model to DLINK also allowing
  1124.         the user to say -lm in DCC and have it find MS.LIB if you are
  1125.         using the small-data model.
  1126.  
  1127.     CREATING A LIBRARY
  1128.     DLink libraries are standard Amiga libraries...  simply join one or
  1129.     more object modules together and rename the result with a .lib
  1130.     extension.
  1131.  
  1132.     LINKER SYMBOLS
  1133.     DLink generates the following special symbols to aid in program
  1134.     startup:
  1135.  
  1136.     Symbol           : Meaning
  1137.     ===============+=====================================================
  1138.     __ABSOLUTE_BAS : Base of data in volatile space.  This symbol is NOT
  1139.                : defined for normal residentable programs since the
  1140.                : base address is not known (must be allocated
  1141.                : run-time)
  1142.     ---------------+-----------------------------------------------------
  1143.     __DATA_BAS     : Base of data in non-volatile space.  This symbol
  1144.                : points to a read-only copy of the initialized data
  1145.                : for a program.  For Non-residentable programs this
  1146.                : is the same as __ABSOLUTE_BAS. For residentable
  1147.                : programs this points to a read-only copy of the
  1148.                : initialized data that the program can duplicate on
  1149.                : startup. For programs linked with an absolute base
  1150.                : address for data this points to the end of the CODE
  1151.                : section.  The ROMABLE program always generates a
  1152.                : ROM copy of the initialized data just after the
  1153.                : CODE section (which startup code must copy into
  1154.                : RAM)
  1155.     ---------------+-----------------------------------------------------
  1156.     __DATA_LEN     : Length of data space is longwords.  i.e.
  1157.                : __DATA_LEN*4 yields the number of bytes of
  1158.                : initialized data.  This is used by startup code to
  1159.                : copy read-only initialized data to volatile space
  1160.                : (residentable and data-absolute programs)
  1161.     ---------------+-----------------------------------------------------
  1162.     __BSS_LEN      : Length of bss space in longwords.  i.e.
  1163.                : __BSS_LEN*4 yields the number of bytes of
  1164.                : uninitialized (BSS) data.  This is used in
  1165.                : combination with __DATA_LEN to allocate the
  1166.                : DATA+BSS space for residentable programs, and clear
  1167.                : the BSS space for non-residentable and
  1168.                : absolute-data-base programs.  The BSS space occurs
  1169.                : after the DATA space unless the -frag option is
  1170.                : used.
  1171.     ---------------+-----------------------------------------------------
  1172.     __RESIDENT5D   : This symbol is set to 0 if the -r option was used
  1173.                : and 1 if the -r option was not used.  If set to 1
  1174.                : (-r option)
  1175.     ---------------+-----------------------------------------------------
  1176.  
  1177.     Programs linked with the -mw or -ma options obviously do not
  1178.     'allocate' their data space since it is predefined.  Most Amiga
  1179.     programmers will never use the -mw or -ma options, by the way.
  1180.  
  1181.     SMALL DATA MODEL
  1182.     The small data model uses A4 relative addressing.  The linker sets up
  1183.     all relative offsets such that A4 must be initialized by startup code
  1184.     the BaseOfInitializedData + 32766 for A4-relative references to
  1185.     access the appropriate address.
  1186.  
  1187.     RESIDENT
  1188.     If the -r options is given then NO BSS SPACE is allocated after the
  1189.     data space...  the startup code MUST allocate a data+bss space as
  1190.     shown above.  DLink will give error messages for any absolute data
  1191.     references that occur (except the __DATA_BAS symbol which must be
  1192.     used to copy the static data to the newly allocated data+bss memory
  1193.     on program startup).
  1194.  
  1195.     DLink will give an error message if any data-data reloco32s exist
  1196.     when you specify the -r option as such relocations would be incorrect
  1197.     when copied to the newly allocated data+bss space.  DC1 understands
  1198.     this and will produce autoinit code to handle any such static data
  1199.     relocations that occur in your C code when the -r option is given to
  1200.     compile a C program.
  1201.  
  1202.     However, DLink does allow data-data relocations to occur if an
  1203.     absolute data base is specified along with the -r option.  This is
  1204.     used only when making ROMABLE code.
  1205.  
  1206.     PC-RELATIVE
  1207.     Because the linker will insert a jump table for PC-RELATIVE
  1208.     references to different hunks (after coagulation) or where the range
  1209.     is larger than +/-32K, data should not be placed into a code segment
  1210.     and be referenced via an external label(pc) unless you are positive
  1211.     the reference is within +/-32K.  This can only happen when
  1212.     referencing between like-named code hunks.  NOTE that the jump table
  1213.     is tagged onto the end of the section the jump(s) occur in and thus
  1214.     you do not want to have any autoinit/autoexit code that might
  1215.     possibly generate a jump table (since the whole idea with autoinit is
  1216.     that the code falls through to other autoinit code until the
  1217.     terminating section in x.o's RTS).
  1218.  
  1219.     Currently dlink cannot handle inter-module PC-RELATIVE references
  1220.     beyond +/-32K (i.e.  when one object file has more than 32K of code).
  1221.     An error will occur.
  1222.  
  1223.     Note that if -frag is used you cannot make PC-RELATIVE calls between
  1224.     sections of differing names ever, or make a program resident.  The
  1225.     -frag option is almost never used on untested.
  1226.  
  1227.     || NOTE: When -frag is specified, the linker will not create a
  1228.     || special combined data+bss hunk (so data and bss can both be
  1229.     || referenced with one base variable).
  1230.  
  1231.     However, when -frag is NOT specified, the linker will stil not
  1232.     necessarily combine ALL data hunks into one big hunk and ALL bss
  1233.     hunks into one big hunk.  Any data or bss hunk with special upper
  1234.     bits set (e.g. to force it into chip) is not combined into these
  1235.     special hunks, and any data or bss hunk whos NAME begins with 'far'
  1236.     (upper or lower case) will also not be considered.
  1237.  
  1238.     EXAMPLE
  1239.     This is what DCC gives the linker to link the program foo.c:
  1240.  
  1241.     dlink dlib:c.o @tmp dlib:x.o -o ram:foo
  1242.  
  1243.     Where tmp contains:
  1244.  
  1245.     foo.o
  1246.     dlib:c.lib
  1247.     dlib:amiga.lib
  1248.     dlib:auto.lib
  1249.  
  1250.     Basically it tells dlink to link the startup code, c.o, then the
  1251.     program object module(s) (foo.o), then c.lib, amiga.lib, and
  1252.     auto.lib, then finally x.o.
  1253.  
  1254.     DCC handles all this for you
  1255.  
  1256.     auto.lib contains autoinit code for certain selected libraries,
  1257.     including the dos.library.  Autoinit code is brought in whenever a
  1258.     given library base symbol has been referenced BUT NOT DEFINED.
  1259.     auto.lib defines the symbol and generates autoinit code to open the
  1260.     library and autoexit code to close the library.  To maintain
  1261.     portability you probably do not want to use this automatic
  1262.     library-opening feature yourself, it is really meant to support
  1263.     certain actions of the DICE library (such as floating point support).
  1264.  
  1265.     x.o terminates the autoinit and autoexit sections with an RTS
  1266.     instruction.  The autoinit and autoexit sections are called from the
  1267.     startup code c.o.
  1268.  
  1269. dice/dmake                                                        dice/dmake
  1270.  
  1271.     FUNCTION
  1272.     Make Utility
  1273.  
  1274.     SYNOPSIS
  1275.     dmake [file]
  1276.  
  1277.     DESCRIPTION
  1278.     Make utilities automate complex compiles.  Makefiles can be
  1279.     considered recipes for complex programs.  Makefiles contain
  1280.     "dependencies," which are rules that say things like "if this header
  1281.     file changes, recompile this C file."
  1282.  
  1283.     The idea with DMake is to provide a powerful make utility through
  1284.     general features rather than specialized hacks.  DMake is governed by
  1285.     a few simple rules that can be combined into incredibly powerful
  1286.     operations.
  1287.  
  1288.     Generally you simply run DMake and have a list of dependencies in
  1289.     your DMakefile which DMake then executes.  The DMakefile may contain
  1290.     three different kinds of lines:
  1291.  
  1292.     1) COMMENTS -- Any line beginning with a '#' is a comment and ignored
  1293.  
  1294.     # This DMakefile generates an executable for fubar
  1295.     # The compiler options are as follows ...
  1296.  
  1297.     1) ASSIGNMENTS -- Any line of the form SYMBOL = ...  is considered an
  1298.        assignment.    Any variable references from within the assignment
  1299.        will be resolved immediately.
  1300.  
  1301.     CFLAGS= -r SRCS= x.c y.c z.c
  1302.  
  1303.     1) DEPENDENCIES: -- A line containing a list of symbols, a colon, and
  1304.        more symbols is assumed to be a dependency.    Note that you cannot
  1305.        have a raw filename with a colon in it as that confuses DMake.
  1306.        Instead, use an ASSIGNMENT variable.
  1307.  
  1308.     Following the dependency line is zero or more command lines --
  1309.     commands to run to resolve the dependency, terminated with a blank
  1310.     line.
  1311.  
  1312.     || NOTE: Not only is a zero-command dependency allowed, it is
  1313.     || sometimes necessary.
  1314.  
  1315.     A particular destination may have only ONE command list so if you
  1316.     have something like
  1317.  
  1318.     a.o : a.c
  1319.  
  1320.     with a command list to compile the source into an object you can also
  1321.     have another dependency such as 'a.o : defs.h' which would NOT have
  1322.     any associated command list.
  1323.  
  1324.     dst1 ...  dstN : src1 ...  srcN command1 command2 ...
  1325.     dst1 ...  dstN : src1 ...  srcN command1 command2 ...
  1326.  
  1327.     Finally, note that a dst* or src* symbol does not need to be a
  1328.     filename.  It is perfectly valid to make up dummy names which are
  1329.     then used as the lhs of a dependency that collects other dependencies
  1330.     together.
  1331.  
  1332.     DEPENDENCIES
  1333.     When declaring dependencies you may use four different forms.  The
  1334.     first form is to have a single destination and several sources.  This
  1335.     is interpreted to mean that ALL the sources must be resolved before
  1336.     the single destination can be resolved via the command list for the
  1337.     dependency.  The special variable, %(left), is set to the dst symbol
  1338.     and the special variable %(right) is set to ALL of the src symbols
  1339.  
  1340.     For example, this form would be used to indicate that an executable
  1341.     depends on all the objects being resolved before you can run the
  1342.     link.
  1343.  
  1344.     dst : src1 src2 src3 ...  srcN
  1345.  
  1346.     The second form is the most useful in that it allows you to specify
  1347.     multiple 1 : 1 dependencies.  Thus, you can specify, for example,
  1348.     that each object file depends on its source file counterpart for ALL
  1349.     the files in your project on a single line and have a single command
  1350.     list representing what to do (to compile a source file into an
  1351.     object, say).
  1352.  
  1353.     In this case %(left) and %(right) are set to each dst* : src* pair
  1354.     individually and the command list is run for any individual pair that
  1355.     is out of date.
  1356.  
  1357.     dst1 dst2 dst3 ...  dstN : src1 src2 src3 ...  srcN
  1358.  
  1359.     The next form may be used to specify that many files depend on one
  1360.     file being resolved.  An example of usage would be to make all the
  1361.     object files depend on one header file.  The command list, if any, is
  1362.     run for each dst* : src pair with %(left) set to the current dst* and
  1363.     %(right) set to the single source.
  1364.  
  1365.     dst1 dst2 dst3 ...  dstN : src
  1366.  
  1367.     The last form is esoteric but sometimes useful.  EACH dst* on the
  1368.     left hand side depends on the entire right hand side.  You can have
  1369.     an arbitrary number of symbols on either side.    %(left) will be set
  1370.     to a particular DST while %(right) will be set to all of the SRCs.
  1371.  
  1372.     for example, you could specify $(OBJS) :: $(HDRS) -- make all objects
  1373.     depend on all headers causing a recompile to occur if any header is
  1374.     modified.
  1375.  
  1376.     dst1 dst2 dst3 ...  dstN :: src1 src2 ...  srcI
  1377.  
  1378.     WILDCARDS
  1379.     DMake's most powerful feature is an easy to use file list replacement
  1380.     through options in a variable specification.  You may insert the
  1381.     contents of any variable using the form:
  1382.  
  1383.     $(SYMBOL)
  1384.  
  1385.     Furthermore, you can make modifications to the contents of the
  1386.     variable on the fly using:
  1387.  
  1388.     $(SYMBOL:wildcard)
  1389.  
  1390.     only those files which match wildcard
  1391.  
  1392.     $(SYMBOL:wildcard:wildcard)
  1393.  
  1394.     matching files and also do a conversion
  1395.  
  1396.     Simple */? wildcarding is used.  A wildcard may contain a colon or
  1397.     other punctuation but if it does you MUST surround it with quotes.
  1398.     Here is a quick example:
  1399.  
  1400.     SRCS= a.c b.c c.c d.c xx.a
  1401.     OBJS= $(SRCS:*.c:"dtmp:%1.o")
  1402.  
  1403.     all: echo $(OBJS)
  1404.  
  1405.     Will Produce
  1406.  
  1407.     dtmp:a.o dtmp:b.o dtmp:c.o dtmp:d.o
  1408.  
  1409.     The first wildcard specification restricts which files from the list
  1410.     are to be taken -- 'xx.a' was ignored, as you can see.  Each '*' or
  1411.     '?' in the first wildcard specification corresponds to %N
  1412.     specifications in the second wildcard specification.  You can
  1413.     prepend, insert, or append text and freely mix or ignore items
  1414.     matched to create your destination file list.
  1415.  
  1416.     This capability allows you to specify your source files EXACTLY ONCE
  1417.     in the DMakefile and then use the file munging capability to convert
  1418.     them to the object file list, etc...
  1419.  
  1420.     You can embed variables within variables as with the following
  1421.     example (note that this time xx.a is included):
  1422.  
  1423.     OD= dtmp:fubar/
  1424.     SRCS= a.c b.c c.c d.c xx.a
  1425.     OBJS= $(SRCS:*.?:"$(OD)%1.o")
  1426.  
  1427.     all: echo $(OBJS)
  1428.  
  1429.     Will produce
  1430.  
  1431.     dtmp:fubar/a.o dtmp:fubar/b.o dtmp:fubar/c.o
  1432.     dtmp:fubar/d.o dtmp:fubar/xx.o
  1433.  
  1434.     As a side note, you may also specify '?' and '*' in the destination
  1435.     wildcard.  These are considered dummies and are equivalent to %N
  1436.     where N is incremented from 1..9 for each '?' or '*' encountered.
  1437.  
  1438.     You can use the capability anywhere in the DMakefile.  Another common
  1439.     thing to do is restrict your link line to include only the object
  1440.     files and skip the headers:
  1441.  
  1442.     $(EXE) : $(PROTOS) $(OBJS) $(HDRS)
  1443.     dcc %(right:*.o) -o %(left)
  1444.  
  1445.     ENVIRONMENT VARIABLES
  1446.     2.0 local variables and 1.3/2.0 ENV: variables are fully accessible.
  1447.     Under 2.0 you can also modify local variables on the fly.
  1448.     DMake-specific variables override 2.0 local variables override ENV:
  1449.     variables.
  1450.  
  1451.     Under 2.0, any command containing <, >, `, or |, or is an alias, will
  1452.     be run with System().  Thus, such commands may not be used to modify
  1453.     local variables or the local environment.  Also, such commands cannot
  1454.     be ^C'd due to the way AmigaDOS works.
  1455.  
  1456.     EXAMPLE
  1457.     The following is an example dmakefile.    The variable $(FILES) is set
  1458.     to "main input output".  The next two variables are constructed from
  1459.     $(FILES).  The command $(FILES:*:"*.c") tells dmake to take $(FILES),
  1460.     look up each item ":*", and append two characters ":*.c".  The
  1461.     results of the conversions are listed above.  This unique feature of
  1462.     dmake makes for very elegant DMakeFiles.
  1463.  
  1464.     The first rule is the default rule, executed if you just type dmake.
  1465.     The rule, "sample:", states that the resulting program, "sample", is
  1466.     made up from the files listed in $(FILE_OBJECTS). If the date on
  1467.     "sample" is older than any dates in $(FILE_OBJECTS), the rule will
  1468.     execute.
  1469.  
  1470.     In turn, the next rule states that $(FILE_OBJECTS) ("main.o input.o
  1471.     output.o") are made from $(FILE_SOURCES) ("main.c intput.c
  1472.     output.c").  If any of the .o files are older than the corresponding
  1473.     .c file, the rule executes.
  1474.  
  1475.     In short, the makefile is a description of how source files inter
  1476.     depend.  When any file changes, dmake figures the minimum number of
  1477.     steps to regenerate the final result.  If you change just "input.c",
  1478.     only "input.c" will recompile.
  1479.  
  1480.     The last rule, "clean:", has no dependencies (nothing on the right
  1481.     side of the :).  When executed, this rule deletes all the
  1482.     compiler-generated files, but not the source code. To execute this
  1483.     rule, type "dmake clean".  Any number of rules may exist in a single
  1484.     DMakeFile.
  1485.  
  1486.                       :     DMakeFile - generic
  1487.     ------------------------------+-------------------------------------
  1488.     FILES = main input output     : Equals "main input output" Set to
  1489.     FILE_SOURCES =              : "main.c input.c output.c" Set to
  1490.     $(FILES:*:*.c") FILE_OBJECTS  : "t:main.o t:input.o t:output.o"
  1491.     = $(FILES:*:"t:*.o)           :
  1492.     ------------------------------+-------------------------------------
  1493.     sample: $(FILE_OBJECTS)     dcc  : Rule: sample is made from
  1494.     $(FILE_OBJECTS) -o sample     : FILE_OBJECTS (defined above as
  1495.                       : "t:main.o t:input.o t:output.o")
  1496.     ------------------------------+-------------------------------------
  1497.     $(FILE_OBJECTS) :          : Rule: FILE_OBJECTS are made from
  1498.     $(FILE_SOURCES)     dcc -c         : FILE_SOURCES (see above).
  1499.     %(right) -o %(left)          :
  1500.     ------------------------------+-------------------------------------
  1501.     clean:              delete  : Rule: "dmake clean" executes this
  1502.     $(FILES) $(FILE_OBJECTS)      : delete command.
  1503.     ------------------------------+-------------------------------------
  1504.  
  1505.     LINE CONTINUATION AND ESCAPES
  1506.     Any line may be continued by terminating it with a backslash '\'.  It
  1507.     is possible to escape the special characters '$' and '%' by doubling
  1508.     them though this is only necessary if an open-parenthesis follows the
  1509.     '$' or '%' and you do not want it interpreted as a variable.
  1510.  
  1511.     It is possible to escape ':' and other special characters by
  1512.     assigning them (or a string containing them) to a variable
  1513.  
  1514.     COMMAND SHELL
  1515.     Under 2.0 commands that do not contain any sort of redirection are
  1516.     run with RunCommand().    If a command is an alias or there is some
  1517.     sort of redirection in the arguments it will be run with System().
  1518.  
  1519.     Under 1.3 everything is run with Execute()
  1520.  
  1521.     ADVANCED CAPABILITIES
  1522.     Now, you may have noted earlier that I said you could not have any
  1523.     given left-hand-side with more then one command list.  Take, for
  1524.     example:
  1525.  
  1526.     a.o : a.c dcc %(right) -o %(left)
  1527.  
  1528.     a.o : defs.h <--- illegal to put command list here
  1529.  
  1530.     Actually, it isn't illegal.  When DMake encounters a dependency
  1531.     without a command list it will automatically 'force' the next higher
  1532.     level dependency of the same left-hand-side.  Therefore if you do not
  1533.     have a command list for the lower level left-hand-side things work as
  1534.     you expect.  Note that this requires all such null dependencies to
  1535.     exist AFTER the one that has the command list.
  1536.  
  1537.     If you do have two or more command lists for the same left-hand-side
  1538.     they will run independent of each other according to their individual
  1539.     right hand sides.  If several command lists apply then their order of
  1540.     execution will be bottom-up
  1541.  
  1542.     TEST FOR EXISTENCE
  1543.     Another advanced feature quite useful in fully automating the
  1544.     compilation process is the ability to create a directory tree on the
  1545.     fly.  That is, if you have a projects called 'fubar' and want the
  1546.     objects to go into the directory DTMP:fubar/ you might want to have a
  1547.     dependency that creates DTMP:fubar if it does not already exist.
  1548.  
  1549.     XX= dtmp:fubar
  1550.     $(XX) : $(XX) makedir %(left)
  1551.  
  1552. dice/dme                                                            dice/dme
  1553.  
  1554.     FUNCTION
  1555.     Editor
  1556.  
  1557.     SYNOPSIS
  1558.     Dme file
  1559.  
  1560.     DESCRIPTION
  1561.     Dme is a full screen programmable editor.  See chapter for complete
  1562.     documentation.
  1563.  
  1564. dice/makeindex                                                dice/makeindex
  1565.  
  1566.     FUNCTION
  1567.     Build Index File for Online Help System
  1568.  
  1569.     SYNOPSIS
  1570.     MakeIndex outfile pattern
  1571.  
  1572.     DESCRIPTION
  1573.     MakeIndex builds a lookup file for the DICEHelp online help system.
  1574.     This file is normally called "s:dicehelp.index". Entries are always
  1575.     appended to outfile to allow building the index file in steps.    Any
  1576.     number of files may be specified with wildcards in pattern. MakeIndex
  1577.     detects DICE documentation, AutoDoc files from Commodore, C include
  1578.     files and Assembler include files. Documentation files are indexed by
  1579.     the name of the function.  C include files are indexed by structures.
  1580.     The names of assembler includes are recorded, but no additional
  1581.     processing is done.
  1582.  
  1583.     MakeIndex is normally run during the installation, or later by
  1584.     selecting the installer option "refresh DICEHelp index file."  You
  1585.     may append your own selections using MakeIndex.
  1586.  
  1587.     SEE ALSO
  1588.     Chapter , Online help.
  1589.  
  1590. dice/makeproto                                                dice/makeproto
  1591.  
  1592.     FUNCTION
  1593.     Easily Create Prototype File
  1594.  
  1595.     SYNOPSIS
  1596.     makeproto infile outfile
  1597.  
  1598.     DESCRIPTION
  1599.     Collects lines beginning with the word Prototype from all your source
  1600.     files into a single header file.  Each source module in a project
  1601.     normally includes a common header file, DEFS.H, which contains items
  1602.     common to the project.    The idea is to add the following to your
  1603.     DEFS.H file:
  1604.  
  1605.     #define Prototype extern
  1606.     #define Local static /* or as nothing at all */
  1607.     #include "protos.h"   /* prototype file generated by MAKEPROTO
  1608.  
  1609.     Each source would contain prototypes that look like this (shown with
  1610.     example declarations):
  1611.  
  1612.     Prototype int FuGlob;
  1613.     Prototype void FuBar(int);
  1614.     Prototype struct MyFu *FuBar2(short);
  1615.  
  1616.     int FuGlob; /* etc... */
  1617.  
  1618.     void FuBar(int x) {
  1619.     ...
  1620.     }
  1621.  
  1622.     You then create a PROTOS.H file by running MAKEPROTO on all source
  1623.     files.    Among the tricks that are possible is the use of structure
  1624.     tags instead of typedefs in the prototypes themselves, allowing the
  1625.     prototype file to be #include'd during the normal course of
  1626.     compilation without necessarily requiring precursor includes to
  1627.     guarantee the validity of the types you use.  Since a declaration
  1628.     containing a pointer to an undefined structure is valid as long as
  1629.     you do not try to access specific elements in the structure, this
  1630.     allows you to bring in prototypes for all functions in your entire
  1631.     project whether you use them in any specific source module or not.
  1632.  
  1633.     MAKEPROTO has one additional feature which makes its usage all the
  1634.     more efficient... if the specified output file already exists
  1635.     MAKEPROTO will compare its output with the existing file and not
  1636.     modify the date stamp of the file unless the output diffs.  This is
  1637.     especially useful when you use precompiled includes where you might
  1638.     want to include a dependency to force the precompiled include to be
  1639.     recomputed if any header file OR the prototype file changes.  Without
  1640.     this feature you would have to force the precompiled include to be
  1641.     recomputed every time you modify a source file because you would not
  1642.     be able to determine whether that modification resulted in a change
  1643.     in the prototype file PROTOS.H or not.
  1644.  
  1645. dice/touch                                                        dice/touch
  1646.  
  1647.     FUNCTION
  1648.     Update File Datestamp
  1649.  
  1650.     SYNOPSIS
  1651.     touch file
  1652.  
  1653.     DESCRIPTION
  1654.     Touch bumps the date of a file without changing the contents.  This
  1655.     is useful to force utilities like VMake and DMake to recompile source
  1656.     files.
  1657.  
  1658. dice/VMake                                                        dice/VMake
  1659.  
  1660.     FUNCTION
  1661.     Visual Interface to DICE
  1662.  
  1663.     DESCRIPTION
  1664.     VMake is a complete control center for DICE.  From within VMake you
  1665.     can manage a project, check files in or out of RCS, select files to
  1666.     edit, and finally compile and run your program.  VMake is an
  1667.     alternate to the CLI-based dcc program.  VMake is very flexible, and
  1668.     can be configured to control programs other than DICE.    See chapter
  1669.     for a full description.
  1670.  
  1671. dice/VOpts                                                        dice/VOpts
  1672.  
  1673.     FUNCTION
  1674.     Visual Interface for Setting Options
  1675.  
  1676.     DESCRIPTION
  1677.     VOpts provides an easy and powerful visual interface for selecting
  1678.     compiler options.  Options may be specified explicitly, or simply
  1679.     left to defaults.  VOpts is very flexible, can can be configured to
  1680.     set options for any program, not just DICE.  See chapter for all the
  1681.     details.
  1682.  
  1683. dice/wbrun                                                        dice/wbrun
  1684.  
  1685.     FUNCTION
  1686.     Simulate Starting a Program From Workbench
  1687.  
  1688.     SYNOPSIS
  1689.     wbrun file
  1690.  
  1691.     DESCRIPTION
  1692.     Wbrun is used by VMake to simulate the method used by the Amiga
  1693.     Workbench to start programs.
  1694.  
  1695.