home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / c / compile.zip / HINTKINK.DOC < prev    next >
Text File  |  1992-08-26  |  30KB  |  914 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.          Hints and Kinks for Compiling and Linking QuickBASIC Programs
  24.  
  25.                              c1991 Thomas Software
  26.  
  27.     
  28.     
  29.     
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.                              
  57.                               
  58.                               
  59.                               
  60.                               
  61.                               
  62.                               Table of Contents
  63.  
  64.     Contents ......................................................... 2
  65.     Introduction ..................................................... 3
  66.     What's this BC and Link stuff? ................................... 4
  67.     BC (Basic Compiler) .............................................. 5
  68.     LINK ............................................................. 5
  69.     
  70.     QuickCompile's BC Options
  71.         
  72.         EXE Requiring BRUNxx.EXE ..................................... 6
  73.         /T  Terse Error Display ...................................... 6
  74.         /D  Produce Debug Code ....................................... 6
  75.         /A  Disassembled List File ................................... 7
  76.         /ZI  CodeView Object Code .................................... 7
  77.         /ZD  Symbolic Debugger Code .................................. 7
  78.         /S  Quoted Strings to OBJ .................................... 7
  79.         /R  Row-Major Order Arrays ................................... 7
  80.         /AH  $DYNAMIC Arrays > 64k ................................... 7
  81.         /C:<number>   Communications Routines ........................ 8
  82.         /MBF  MicroSoft Binary Format ................................ 8
  83.         /X  ON ERROR/RESUME <NEXT> <0> ............................... 8
  84.         /E  ON ERROR/RESUME <LineNumber> ............................. 8
  85.         /V  ON [event] Normal Trap ................................... 9
  86.         /W  ON [event] Fast Trap ..................................... 9
  87.         NO [event] Trapping .......................................... 9
  88.         Source List File ............................................. 9
  89.         Delete OBJ Code .............................................. 9
  90.     
  91.     QuickCompile's Link Options
  92.  
  93.         /E  EXEPACK (optimized exe size) ............................ 10
  94.         /PAU  PAUSE before exe write ................................ 10
  95.         /I  Show Link INFORMATION ................................... 10
  96.         /B  BATCH mode (no prompts) ................................. 10
  97.         /M  Create MAPFILE .......................................... 11
  98.         /LI  MapFile with LINENUMBERS ............................... 11
  99.         /NOI  NOIGNORECASE (observe case) ........................... 11
  100.         /NOD  NODEFAULTLIBRARY (using PDQ, etc...) .................. 11
  101.         /NOE  NOEXTDICTIONARY (using nocom, etc...) ................. 12
  102.         /SE:<number>  SEGMENTS ...................................... 12
  103.         /CO  CODEVIEW preparation ................................... 12
  104.         /FAR  FAR ................................................... 12
  105.         /PAC:<number>  PACKCODE ..................................... 13
  106.         /ST:<number>  STACK ......................................... 13
  107.     
  108.     NOCOM.OBJ (No Communications Routines) .......................... 14
  109.     NOEM.OBJ (No Floating Point Emulation) .......................... 14
  110.     SMALLERR.OBJ (No Error Messages) ................................ 15
  111.     EXISTS.BAS Module (Check for existance of a file) ............... 15
  112.     CHK4QC .......................................................... 16
  113.                                      - 2 -
  114.  
  115.  
  116.     
  117.     
  118.     
  119.                                 Introduction
  120.     
  121.     This Booklet is a compilation of various tips for Compiling and Linking
  122.     QuickBASIC programs from outside the QuickBASIC Environment. This info
  123.     is being provided to Registered QuickCompile users free of charge as a
  124.     guide to help produce better and more efficient programs.
  125.  
  126.     We believe this material to be timely and helpful. However, no claim
  127.     to accuracy is made. Thomas Software and the Authors may not be held
  128.     liable for any circumstances that may arise from it's use.
  129.  
  130.     The information presented here is not intended to teach how to compile
  131.     and link from the command line, but how to better use QuickCompile for
  132.     for this purpose.
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.                                      - 3 -
  171.                                     
  172.  
  173.  
  174.                        
  175.                        
  176.                        What's this BC and Link stuff ?
  177.  
  178.     When you write programs in QuickBASIC, you use statements and functions
  179.     that cause specific actions to occur. The PRINT statement may cause a
  180.     line of text to be printed to the screen.
  181.  
  182.     EXAMPLE:
  183.  
  184.         PRINT " HELLO WORLD ! "
  185.  
  186.         Causes the words HELLO WORLD ! to be printed wherever
  187.         the cursor is located at the time. (Of course you already
  188.         knew this, but we're trying to keep thing simple here.)
  189.  
  190.     Your computer does not really understand the meaning of the statement
  191.     "PRINT". In fact, it doesn't understand any of the statements or
  192.     functions included in the QuickBASIC Language. Computers speak Machine
  193.     language...
  194.  
  195.     How do we get the computer to understand our QB programs? Two ways.
  196.  
  197.     The first, is the interpreter, a feature of the QuickBASIC environment.
  198.     We use the editor to type in our programs and then press F5 (run) to
  199.     execute them. The interpreter looks at each line of our program and
  200.     translates them into machine code that the computer can understand.
  201.     Some statements in the source code (program file) are directly
  202.     translated into machine code. Others are translated into machine code
  203.     and calls to routines in the basic language's run time library.
  204.     GW Basic is an interpreted basic. You cannot run GW Basic programs
  205.     without loading the interpreter.
  206.  
  207.     Secondly, QuickBASIC is a compiled Basic. It can produce .EXE files
  208.     that may be run without the help of an interpreter.
  209.     After you have written your program and tested it in the QB environment,
  210.     you may choose the "Make exe file" command from the "Run" menu.
  211.     QuickBASIC will then produce an executable (.EXE) file that runs
  212.     outside the environment. Compile programs run faster than interpreted
  213.     ones because the machine code has already been produced and does not
  214.     need to be interpreted on the fly.
  215.  
  216.     QuickBASIC produces two types of .EXE files. Those that require
  217.     a runtime library (BRUN45.EXE) and those that are stand-alone.
  218.     Programs requiring BRUN are smaller because much of the machine code
  219.     is contained in the BRUN file. However, stand-alone programs generally
  220.     run faster and use less memory because everything the program needs is
  221.     self contained.
  222.  
  223.  
  224.  
  225.  
  226.  
  227.                                      - 4 -
  228.                                     
  229.  
  230.                               
  231.                               
  232.                               
  233.                               BC (Basic Compiler)
  234.  
  235.     BC.EXE is the QuickBASIC compiler. This is the first step in turning
  236.     your source code (.BAS files) into .EXE files. BC produces .OBJ (object)
  237.     files which are combined to produce .EXE files.
  238.     There are many options to BC that specify how to, and what kind of object
  239.     file to produce. When your compile within the QB environment, you are
  240.     not allowed to change these options. This is just one of many reasons
  241.     to leave the environment for compiling.
  242.  
  243.                                      
  244.                                      LINK
  245.  
  246.     LINK.EXE is the QuickBASIC linker. This is the final step in turning
  247.     your source code into .EXE files. Once an object file has been created
  248.     from your source, it needs to be linked (combined) with other object
  249.     files and libraries (collections of object files) to produce the .EXE
  250.     file. Like BC, Link has many options that you can't use from inside
  251.     the QB environment.
  252.  
  253.     BC and Link both have uses other than those we just mentioned, but
  254.     they are beyond the scope of this booklet.
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.                                      - 5 -
  285.  
  286.  
  287.  
  288.  
  289.  
  290.                            QuickCompile's BC Options
  291.  
  292.     EXE Requiring BRUNxx.EXE
  293.  
  294.         This first option allows you to specify producing an .EXE file that
  295.         requires BRUN. This is the default when you compile within the QB
  296.         environment. However, it has been our experience that most people
  297.         prefer building stand-alone .EXE files. Therefore, QuickCompile
  298.         defaults to stand-alone and specifies the /O switch (not shown).
  299.  
  300.         Normally, this option is most useful if you are distributing a 
  301.         software package that contains many .EXE files, and want to
  302.         conserve disk space. Also, when chaining programs, BRUNxx.EXE
  303.         operates faster because the library need not be loaded again.
  304.         
  305.         If you choose this option, you must be certain that the end user has
  306.         a copy of the correct BRUNxx.EXE file, or the program will not run.
  307.  
  308.         For optimum program execution speed, you will not want to use the
  309.         EXE Requiring BRUNxx.EXE option. Stand Alone executables are always
  310.         faster, use less memory, and are easier to manage.
  311.  
  312.     /T  Terse Error Display
  313.  
  314.         Causes BC to not display the copyright notice or warning messages (if
  315.         errors are encountered) during compiling.
  316.         (/T is a QB Environment default.)
  317.  
  318.         We normally don't recommend using this switch because it's helpful
  319.         to know all you can about possible errors in your program.
  320.  
  321.     /D  Produce Debug Code
  322.  
  323.         Produces debugging code for runtime error checking. Also Enables
  324.         CTRL-BREAK.
  325.  
  326.         This option is useful when developing and debugging a program because
  327.         you may hit CTRL-BREAK at any point in program execution and exit.
  328.         
  329.         QuickBASIC programs do not check for overflow errors when performing
  330.         integer math. /D enables integer math overflow error checking.
  331.         
  332.         When you're not using the /AH switch, compiled QuickBASIC programs do
  333.         not check to see if an array is in bounds or not. If an attempt is
  334.         made to access an array element that is out of bounds, other data
  335.         will be overwritten without warning. Using the /D switch will warn
  336.         when such a condition exists.
  337.  
  338.         However, you should not use the /D switch in the final version of
  339.         your program because it slows execution and adds to the file size.
  340.  
  341.                                      - 6 -
  342.  
  343.  
  344.     
  345.     
  346.     
  347.     /A  Disassembled List File
  348.  
  349.         Produces a list file showing each source line disassembled, and
  350.         it's compiler generated assembly language instructions.
  351.  
  352.  
  353.    /ZI  CodeView Object Code
  354.  
  355.         Produces an object file of information for use by the MicroSoft
  356.         CodeView debugger that comes with several of their other languages.
  357.  
  358.  
  359.    /ZD  Symbolic Debugger Code
  360.  
  361.         Produces an object file with line numbers that correspond to the
  362.         lines of your source file. Useful for source level debugging with
  363.         MicroSoft's SYMDEB Symbolic Debugger.
  364.  
  365.  
  366.     /S  Quoted Strings to OBJ
  367.  
  368.         Places quoted strings in the object file instead of the symbol
  369.         table. Useful for avoiding "Out of memory" errors in programs
  370.         with many string constants.
  371.  
  372.         This option may also reduce the size of your .EXE file.
  373.  
  374.  
  375.     /R  Row-Major Order Arrays
  376.  
  377.         Useful when using routines from other languages that store arrays
  378.         in this order. QuickBasic stores it's arrays in column-major order
  379.         normally.
  380.  
  381.  
  382.    /AH  $DYNAMIC Arrays > 64k
  383.  
  384.         Allows arrays of Records, fixed-length strings, and numeric data
  385.         to be dynamic. These arrays may use all of available memory.
  386.  
  387.         When not used, and arrays are not dimensioned with REDIM, arrays are
  388.         Static and are limited to a maximum of 64k each.
  389.  
  390.         Note that variable-length string arrays are always Static. Only
  391.         fixed-length string arrays may be Dynamic and make use of this option.
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.                                      - 7 -
  399.  
  400.  
  401.     
  402.     
  403.     
  404.     /C:<number>   Communications Routines
  405.  
  406.         Sets the receive buffer size of the comm ports. Default is 512
  407.         bytes total for both ports. Maximum receive buffer size may be
  408.         set to 32,767 bytes. This option has no effect on the transmit
  409.         buffer which is set to 128 bytes for each port and can't be
  410.         changed.
  411.  
  412.         Note that communications routines may be unnecessarily placed in
  413.         your .EXE file without your knowledge, even if you don't specify
  414.         this switch. Read the section on NOCOM.OBJ to insure that your
  415.         programs don't waste 4K of disk space with uncalled comm routines.
  416.  
  417.  
  418.   /MBF  MicroSoft Binary Format
  419.  
  420.         Allows your programs to read and write floating point values
  421.         stored in MicroSoft Binary Format. MKS$, MKD$, CVS, and CVD
  422.         functions are converted to MKSMBF$, MKDMBF$, CVSMBF, and CVDMBF.
  423.  
  424.  
  425.     /X  ON ERROR/RESUME <NEXT> <0>
  426.  
  427.         Use when your program contains ON ERROR with RESUME, RESUME NEXT,
  428.         or RESUME 0.
  429.  
  430.         Note: Using ON ERROR will slow program execution and cause your
  431.               .EXE file size to noticeable increase.
  432.  
  433.               Avoid using any ON ERROR statements in your program if at
  434.               all possible. Many Shareware and Commercial add-on libraries
  435.               have functions with built in error checking to help avoid
  436.               QuickBASIC's ON ERROR.
  437.  
  438.               One often needed error trap is checking to see if a file
  439.               exists. We have created a Basic module to help you avoid
  440.               using ON ERROR in this case. See the section on EXISTS.BAS
  441.               for details.
  442.  
  443.  
  444.     /E  ON ERROR/RESUME <LineNumber>
  445.  
  446.         Use when your program contains an ON ERROR with a RESUME statement
  447.         containing a line number.
  448.  
  449.         See Note above under /X for important information that applies to 
  450.         use of ON ERROR.
  451.  
  452.  
  453.  
  454.  
  455.                                      - 8 -
  456.  
  457.  
  458.     
  459.     
  460.     
  461.     /V  ON [event] Normal Trap 
  462.  
  463.         Use for event trapping the Comm Port (COM), LightPen (PEN),
  464.         JoyStick (STRIG), Timer (TIMER), Music Buffer (PLAY) and 
  465.         Function Keys (KEY).
  466.         
  467.         Checks between each program statement for an event to occur. This
  468.         will cause events to be recognized earlier, but will slow program
  469.         execution and increase file size because BC must place code to
  470.         check for events between each program statement.
  471.  
  472.     /W  ON [event] Fast Trap
  473.  
  474.         Same as /V option, but checks at each program label (or line number)
  475.         for an event to occur.
  476.  
  477.         Checks for events only at labels (or line numbers). Because event
  478.         checking code is only placed at labels, you control where and how
  479.         much event checking is performed.
  480.         
  481.         If it's not absolutely necessary to check between each program
  482.         statement, then /W is the preferred switch for event trapping.
  483.  
  484.     NO [event] Trapping
  485.  
  486.         QuickCompile Defaults to No Event Trapping as most programs don't
  487.         use ON [event] statements.
  488.  
  489.     Source List File
  490.  
  491.         This QuickCompile option is used to produce a Source list File
  492.         containing the address of each line in your source file. All
  493.         source text, it's size, and any error messages are also included.
  494.  
  495.     Delete OBJ Code
  496.  
  497.         This QuickCompile option cause the .OBJ file to be deleted after
  498.         Compiling and Linking are complete. This saves time and disk space.
  499.         Use this option on programs containing only one module (.BAS file).
  500.  
  501.         However, if your program has more than one module, you may not want
  502.         to use this option. When changes are made to only one module of a
  503.         multi-module program, it is only necessary to recompile that module.
  504.  
  505.         When compiling and linking multi-module programs, QuickCompile checks
  506.         to see which modules have changed by comparing the date/time stamp
  507.         of each modules source (.BAS) file and object (.OBJ) file. 
  508.  
  509.         Time and wear and tear on your disk will be saved because only
  510.         modules that have changed will be recompiled by BC. But, if you have
  511.         deleted a module's .OBJ file, it must be recompiled.
  512.                                      - 9 -
  513.  
  514.  
  515.                              
  516.                              
  517.                              
  518.                           QuickCompile's Link Options
  519.  
  520.  
  521.     /E  EXEPACK (optimized exe size)
  522.  
  523.         Optimizes the load time allocation table by removing sequences of
  524.         repeated bytes (usually null characters). Linking with /E will
  525.         cause .EXE files to be smaller and load faster. This switch is
  526.         a QuickCompile and QB environment default. You will normally want
  527.         to always use this option.
  528.  
  529.         NOTE: If you plan to use an executable file compressor (like
  530.               LZEXE or PKLITE), you should not use this switch. These
  531.               utilities will usually perform better on files that were
  532.               not previously packed with EXEPACK.
  533.  
  534.  
  535.   /PAU  PAUSE before exe write
  536.  
  537.         Causes LINK to pause and prompt you before writing the .EXE file.
  538.         Useful if you wish to insert another disk to write the .EXE file
  539.         to.
  540.  
  541.         It's doubtful if hard disk users will ever want to use this option.
  542.  
  543.  
  544.     /I  Show Link INFORMATION
  545.  
  546.         Causes LINK to display information about the current linking 
  547.         process. Shows the current phase in linking, and the name of
  548.         files being linked.
  549.  
  550.         Although not normally necessary, this switch is helpful for
  551.         better understanding how link works.
  552.  
  553.  
  554.     /B  BATCH mode (no prompts)
  555.  
  556.         Causes LINK not to stop and prompt you when it cannot find a
  557.         file you specified. LINK continues to operate without prompting.
  558.  
  559.         The only time this option is useful is when you are linking
  560.         several separate programs in one link session. Because QuickCompile
  561.         does not operate in this fashion, this switch is not helpful.
  562.  
  563.         We advise you avoid this option because you will not be alerted
  564.         to errors.
  565.  
  566.  
  567.  
  568.  
  569.                                     - 10 -
  570.  
  571.  
  572.     
  573.     
  574.     
  575.     /M  Create MAPFILE
  576.  
  577.         Creates a MAPFILE that list the program's segments and public
  578.         symbols sorted by address. See the QuickBASIC, Programming in
  579.         BASIC book for more details.
  580.  
  581.  
  582.    /LI  MapFile with LINENUMBERS
  583.  
  584.         Same as the /M option, but includes line number and addresses of
  585.         the source file.
  586.  
  587.  
  588.   /NOI  NOIGNORECASE (observe case)
  589.  
  590.         Normally, LINK does not distinguish between upper and lower case
  591.         letters. This option cause LINK to observe case.
  592.  
  593.  
  594.   /NOD  NODEFAULTLIBRARY (using PDQ, etc...)
  595.  
  596.         Normally, LINK will always include the BRUN or BCOM libraries
  597.         (which one depends on whether you specify QuickCompile's default
  598.         stand-alone or .EXE file requiring BRUNxx.EXE).
  599.  
  600.         This option tells LINK not to include either. Use this option
  601.         when you are linking with a replacement library like PDQ.
  602.         QuickCompile automatically uses /NOD when you select PDQ.LIB as
  603.         a library to link with. 
  604.  
  605.         This option is also useful if you place the BRUN and BCOM libraries
  606.         in a path that LINK can't find. However, you must first select the
  607.         library within QuickCompile so LINK will know the new path.
  608.  
  609.         We suggest that you place all libraries in the same path and set the
  610.         "LIB" environment variable so that QuickCompile will always know 
  611.         where your libraries are. This will save time and unnecessary 
  612.         keystrokes (or mouse clicks).
  613.  
  614.         Place the line   "SET LIB=<LibraryPath>"   in your AUTOEXEC.BAT file,
  615.         where <LibraryPath> is the Drive/Directory where libraries are stored.
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.                                     - 11 -
  627.  
  628.  
  629.   
  630.   
  631.   
  632.   /NOE  NOEXTDICTIONARY (using nocom, etc...)
  633.  
  634.         Causes LINK to search the individual object files instead of the
  635.         dictionaries it has created to resolve certain conflicts.
  636.  
  637.         NOTE: If you link with NOEM.OBJ or NOCOM.OBJ, (or PDQ's stub files)
  638.               you must use this option. In most cases, QuickCompile will
  639.               automatically select this option for you.
  640.  
  641.         As suggested above about libraries, we also recommend that you set
  642.         an "OBJ" environment variable for the same reasons.
  643.  
  644.         Place the line   "SET OBJ=<ObjectPath>"   in your AUTOEXEC.BAT file,
  645.         where <ObjectPath> is the Drive/Directory where object files are
  646.         stored. It's also best to place all special object files that
  647.         use often in this same directory.
  648.  
  649.  
  650.    /SE:<number>  SEGMENTS
  651.  
  652.         Sets the number of segments that LINK will allow your program to
  653.         have. You may specify any number from 1-1024. Default is 128. See
  654.         the QuickBASIC, Programming in BASIC book for more details.
  655.  
  656.  
  657.    /CO  CODEVIEW preparation
  658.  
  659.         Prepares an .EXE file for debugging with MicroSoft's CodeView
  660.         Debugger.
  661.  
  662.         NOTE: The object files must have been previously compiled with the
  663.               /ZI option. See /ZI under QuickCompile's BC Options in this
  664.               booklet.
  665.  
  666.  
  667.   /FAR  FAR
  668.  
  669.         Used with the /PAC option below to help reduce the size and 
  670.         increase the speed of your .EXE files.
  671.  
  672.      WARNING: Although unlikely, circumstances may arise that will
  673.               cause this option to crash your program. If you use
  674.               this option, you should carefully test every function
  675.               of your program.
  676.  
  677.  
  678.  
  679.                                     
  680.                                     
  681.                                     
  682.                                     
  683.                                     - 12 -
  684.  
  685.  
  686.   
  687.   
  688.   
  689.   /PAC:<number>  PACKCODE
  690.  
  691.         Pack code segments. Causes link to group neighboring segment.
  692.         Code segments that are in the same group will have the same segment
  693.         address. You may specify the size limit of the groups. If not
  694.         specified, the size limit defaults to 65,530. See the QuickBASIC,
  695.         Programming in BASIC book for more details.
  696.  
  697.         NOTE: This option may be used with the /FAR option to optimize
  698.               program execution speed and file size. See /FAR above for
  699.               more information and an important warning.
  700.  
  701.  
  702.   /ST:<number>  STACK
  703.         
  704.         This option allows you to specify how much memory to set aside
  705.         for use as the stack.
  706.  
  707.         When a program has deeply nested calls to non-static procedures,
  708.         or a recursive subprogram is called many times, stack space may
  709.         become exhausted. /ST will allow you to set a larger stack size.
  710.  
  711.         The QB default stack size is 2048 bytes. Maximum allowed stack
  712.         size is 65,535 bytes.
  713.                                    
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.  
  734.  
  735.  
  736.  
  737.  
  738.  
  739.  
  740.                                     - 13 -
  741.  
  742.                                    
  743.                                    
  744.                                    
  745.                                    
  746.                                    NOCOM.OBJ
  747.                          (No Communications Routines)
  748.  
  749.     When your source file includes an OPEN statement with a string variable in
  750.     it, BC will automatically include all com port routines. This happens
  751.     whether you are calling COM or not. 4K file in executable file size can be
  752.     saved by linking with NOCOM.OBJ in these cases. Linking with NOCOM.OBJ when
  753.     not necessary will increase your .EXE file size by 32 bytes, so observe the
  754.     the following rules.
  755.  
  756.     OPEN FILE$ FOR INPUT AS #1            Will cause the com routines to be
  757.                                           included. You should link NOCOM.OBJ.
  758.  
  759.     OPEN "MYFILE.TXT" FOR INPUT AS #1     Will not cause com routines to be
  760.                                           included. You should not link with
  761.                                           NOCOM.OBJ.
  762.  
  763.     When Linking with NOCOM.OBJ you must specify the /NOE switch so that LINK
  764.     will search the object file instead of the dictionaries it has created
  765.     to resolve conflicts. QuickCompile automatically selects this option for
  766.     you.
  767.  
  768.     Of course, if your program does use com routines, do not link with
  769.     NOCOM.OBJ.
  770.  
  771.     When MicroSoft packaged QuickBASIC 4.5, they failed to include the object
  772.     file "NOCOM.OBJ". When you register QuickCompile, you receive (free of
  773.     charge) NOCOM.BAT and NOCOM.SRC. Run NOCOM.BAT from DOS to create a copy
  774.     of NOCOM.OBJ if you don't already have one.
  775.  
  776.  
  777.                                      NOEM.OBJ
  778.                           (No Floating Point Emulation
  779.                            Math Coprocessor installed.)
  780.  
  781.     When a program will always be run on a computer with an 8087, 80287, or
  782.     80387 math coprocessor chip, QuickBASIC's software emulation of the math 
  783.     chip's function are not necessary.
  784.  
  785.     Linking such programs with NOEM.OBJ reduces the size of the executable
  786.     file by excluding emulation routines and speeds program execution by
  787.     allowing the coprocessor to operate.
  788.     
  789.     When Linking with NOEM.OBJ you must specify the /NOE switch so that LINK
  790.     will search the object file instead of the dictionaries it has created
  791.     to resolve conflicts. QuickCompile automatically selects this option for
  792.     you.
  793.  
  794.     If there is a possiblilty that a program will be run on a computer without
  795.     a math coprocessor, DO NOT link with NOEM.OBJ.
  796.  
  797.                                     - 14 -
  798.  
  799.  
  800.  
  801.  
  802.                                   
  803.                                   SMALLERR.OBJ
  804.                                (No Error Messages)
  805.  
  806.     If your program has been tested, and you feel that QuickBASIC's Error
  807.     Messages are not necessary at run time, you may further reduce the size
  808.     of the .EXE file by linking with SMALLERR.OBJ.
  809.  
  810.     Linking with this file reduces program size about 1278 bytes by deleting
  811.     the text of error messages from your program. However, Error numbers will
  812.     still be displayed if a run time error does occur.
  813.  
  814.  
  815.     When Linking with SMALLERR.OBJ you must specify the /NOE switch so that
  816.     LINK will search the object file instead of the dictionaries it has
  817.     created to resolve conflicts. QuickCompile automatically selects this
  818.     option for you.
  819.  
  820.     We suggest that you always link the final version of your program with
  821.     SMALLERR.OBJ. You'll still get error numbers that can be looked up in the
  822.     QuickBASIC manual if an error ever occurs.
  823.  
  824.  
  825.                                EXISTS.BAS Module
  826.                         (Check for existance of a file)
  827.  
  828.     To help you avoid QuickBASIC's ON ERROR statements (and it effects on
  829.     program speed and file size), we have included a Basic Module for you
  830.     to add to your own programs.
  831.  
  832.     EXISTS.BAS is used to determine if a file is present before your
  833.     program attempts to open it.
  834.  
  835.     To add to this function to your program, load your program into the QB
  836.     Environment with the following line:
  837.  
  838.                               QB MYPROG.BAS /L QB
  839.  
  840.     Then, select "Load File" from the "File" menu and add EXISTS.BAS as a
  841.     module. Add the following declaration to your program.
  842.  
  843.                        DECLARE FUNCTION Exists%(FileName$)
  844.  
  845.     The following is an example of how Exists may be used in a program.
  846.  
  847.                IF Exists%(FileName$) THEN
  848.                    PRINT FileName$; "File found..."
  849.                ELSE
  850.                    PRINT FileName$; "File not found..."
  851.                END IF
  852.  
  853.      (cont.)
  854.                                     - 15 -
  855.  
  856.     
  857.     
  858.     
  859.     
  860.     EXISTS.BAS uses QuickBASIC's Call InterruptX routine to check for the
  861.     existence of the specified file. For this reason, you will need to link
  862.     with QB.LIB (the default QB library included with QuickBASIC).
  863.     Be certain to select QB.LIB as a library to link with when using
  864.     QuickCompile.
  865.  
  866.     We recommend that your programs should always check to see if a file is
  867.     present before trying to open it. This way, you can prevent user confusion
  868.     in case the file is not available.
  869.  
  870.     The EXISTS.BAS file is heavily commented so that you can see exactly
  871.     how it works. Interrupts are a great way to perform tasks that
  872.     QuickBASIC can't.
  873.  
  874.  
  875.  
  876.                                      CHK4QC
  877.  
  878.     A small utility is included to check your QuickBasic source code for the 
  879.     presence of QuickCompile headers. CHK4QC displays the version of 
  880.     QuickCompile used and the date that the header was written.
  881.     Note: All source code files must have been saved in ASCII.
  882.  
  883.                                   Using CHK4QC
  884.  
  885.     You can run CHK4QC by simply typing the program name at the command prompt
  886.     or use one of the switches after the program name. 
  887.  
  888.     EXAMPLE:
  889.  
  890.                CHK4QC /P              Will send output to printer.
  891.  
  892.     Valid Command Line Switches:
  893.  
  894.                /P - Sends the output to your printer
  895.                /? - Displays online help screen
  896.  
  897.     After running the program, a list of source code files in the current
  898.     directory will be displayed on your console. If the /P switch is used,
  899.     the output will be sent to the printer instead. To check files in any
  900.     directory, put CHK4QC in a directory listed in your path statement
  901.     and run CHK4QC from the desired directory.
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.                                     - 16 -
  912.  
  913.  
  914.