1
                              README.DOC File
                    
                           Release Notes for the
	   Microsoft(R) QuickC(R) with QuickAssembler, Version 2.01

		(C) Copyright Microsoft Corporation, 1989

This document contains release notes for Version 2.01 of Microsoft
QuickC with QuickAssembler. It includes information on both C and assembly
language. The contents section below lists the documentation for C and
assembly language affected by the release notes. In all cases, the information
in this document supercedes the information in the manuals.

However, Microsoft revises its documentation at the time of reprinting;
the manuals may already include some of this information.

Note: If you're reading this from within on-line help, but would prefer to
print it out by loading README.DOC into a word processor, you can find the
file in the executable files directory (the default is \QC2\BIN).

The other documentation files are \SAMPLES\QASAMPLES.DOC, which explains
the assembly-language example programs in the SAMPLES directory; and
SAMPLES.DOC, which explains the C-language example programs in the same
directory.

(BRIEF is a registered trademark of UnderWare, Inc.  Compaq is a registered
trademark of Compaq Computer Corporation.  Epsilon is a trademark of Lugaru
Software, Inc.  Hercules is a registered trademark of Hercules Computer
Technology.  Logitech is a trademark of Logitech, Inc.)



===============================< Contents >================================


This document has six parts:

          Part           Notes
	  ----		 ----------------------------------------------
            1            Notes on "Up and Running"
            2            Notes on "C for Yourself"
            3            Notes on "QuickC Tool Kit"
	    4		 Notes for Windows and OS/2 Programmers
	    5		 Notes on "QuickAssembler Programmer's Guide"
            6            Notes on On-line Help
	    7		 Additional Notes on QuickC with QuickAssembler


===================< Part 1: Notes on "Up and Running" >===================


Page  Note
----  ----

Inside Front Cover
      Brief Guide to Keystrokes
---   -------------------------
      The chart on the inside front cover says the ESC key "stops the
      compiler and linker from continuing."  ESC stops the compiler but NOT
      the linker.  Press CTRL+BREAK to stop both the compiler and linker.

      If you are using the debugger and running a program that expects
      keyboard input, pressing either CTRL+C or CTRL+BREAK and then ENTER
      will allow you to exit.

 12   Third Screen: The Directories (C 5.1 Compatibility)
---   ---------------------------------------------------
      The following explanation applies only to those who want to use
      QuickC in conjunction with the Microsoft C Optimizing Compiler.

      QuickC complements and augments versions 5.0 and 5.1 of the Microsoft
      C Optimizing Compiler.  If you own one of these compilers, choose the
      directories where the Optimizing Compiler stores executable files,
      libraries, and header files: \BIN, \LIB, and \INCLUDE, for example,
      instead of \QC2\BIN, \QC2\LIB, and \QC2\INCLUDE.  QuickC's programs,
      libraries, include files, and other files are the latest versions
      available.  They are fully compatible with the Optimizing Compiler.

      To maintain compatibility between the two compilers, both QuickC and
      the Optimizing Compiler use the CL environment variable.  If you
      include options that the Microsoft Optimizing Compiler recognizes but
      QuickC does not, QuickC issues an error message.  You will have to
      edit the CL environment variable to eliminate this error.

      The CodeView debugger cannot handle files that have been
      incrementally compiled or incrementally linked.  If you plan to
      examine QuickC programs with CodeView, be sure that these two options
      (incremental compile and incremental link) are turned off.  From the
      command line, use QCL without the /Gi or /Li options.  From the
      QuickC environment, use the Options menu Make command to turn off
      incremental compile and link and to turn on CodeView Info.  This
      warning applies only to CodeView.  QuickC's built-in debugger can
      handle incrementally compiled and linked programs.

      The -qc option allows you to run the QuickC compiler from the
      Microsoft C Optimizing Compiler versions 5.0 or 5.1.  If you own C
      5.0 or 5.1 and want to call QuickC version 2, use this command line:

         cl -B1 qccom -qc 

      In addition, if your hard disk already contains a version of
      LINK.EXE, you are asked if you want to delete the old linker.  Answer
      yes.  QuickC ships with version 4.06 of LINK.EXE.  It is fully
      compatible with versions 5.0 and 5.1 of the Microsoft C Optimizing
      Compiler.

      If you are writing Windows or OS/2 applications, you should use
      version 5.02 of the Microsoft Segmented-Executable Linker.  Read Part
      4 of this README.DOC file for more information about this linker.

 13   Changing AUTOEXEC.BAT
---   ---------------------
      The headline "Changing NEW-VARS.BAT" should read "Changing
      AUTOEXEC.BAT" and the following paragraph should be added:

      If you want to use the 8087 math library instead of the emulator
      library, use the /FPi87 option when you compile from the command line
      (using QCL).  If you compile and link from the QuickC environment,
      either add the line below to your AUTOEXEC.BAT file or type it at the
      command line:

         set CL=/FPi87

 15   Installing on a Floppy-Disk System
---   ----------------------------------
      Note: This item applies only to those using dual floppy systems.

      The description of the first screen says you are asked if you want to
      include PGCHART.LIB in the combined libraries.  This is incorrect.
      There isn't room on the scratch disk for PGCHART.LIB and all of the
      other component libraries.  If you want to use presentation graphics,
      you have two choices.  You can link PGCHART.LIB separately, using the
      Make menu Edit Program List command, or you can use the LIB program
      to add PGCHART to the combined library after you finish installing
      QuickC.

 16   Using QuickC on a Floppy-Disk System
---   ------------------------------------
      QuickC requires certain files.  One arrangement that works well for
      dual-floppy systems is this:

          disk 1:   qc.exe

          disk 2:   qcc.ovl
                    c1.err
                    cl.err
                    link.exe
                    ilink.exe
                    ilinkstb.ovl

          disk 3:   qc.hlp

          disk 4:   qcenv.hlp
                    errors.hlp
                    graphics.hlp
                    notes.hlp
                    *.hlp (any additional help files)

          disk 5:   \include\*.h
                    \lib\Xlibce.lib (X = S, M, C, or L)
                    your own source files

      Set your environment as follows:

            PATH=a:\;b:\
            set INCLUDE=b:\include
            set LIB=b:\lib

      Make the B drive the default.  This is by no means the only setup.
      It helps to minimize swaps but may not be practical for large
      programs.

 21   Command-Line Options
---   --------------------
      Add this note to the description of "QC /h":

      EGA cards can display 43 lines of text, VGA cards can display 50.
      You may use a Microsoft (or fully compatible) mouse with this option.
      If you encounter problems, contact the manufacturer of the mouse.
      For example, early versions of the Logitech(TM) mouse driver do not
      support 43- or 50-line mode.  Later versions support 43-line screens,
      but not 50.

 21   Using the Mouse and Keyboard
---   ----------------------------
      Add this note:

      If you own a COMPAQ(R) SLT/286 Laptop, run the MOUSE.COM program
      before running QuickC.  This fixes a quirk in the COMPAQ BIOS.

 23   Closing Windows
---   ---------------
      Closing a window with the close button does NOT clear its contents.
      For example, if you load a file into the Notepad window, close the
      window, and then try to load the same file into the Source window
      (either explicitly or by pressing F2), QuickC will give you the error
      "File Already Loaded."  To clear the contents of the Notepad window,
      you must choose the File menu New command while the Notepad window is
      active.

 25   The DOS Shell Command
---   ---------------------
      The File menu DOS Shell command lets you exit to DOS.  To return to
      the QuickC environment, type EXIT.  Do NOT type "QC".  If you type
      "QC" from the shell, you load a second copy of QuickC into memory.
      This might cause you to run out of memory when you try to compile a
      program.  Even if you don't run out of memory, compiling will slow
      considerably as portions of QuickC are swapped in and out of memory.

 31   Creating Your Own Key File
---   --------------------------
      If you customize the QuickC editor by creating a key file, you are
      not allowed to assign functions to CTRL+@ or CTRL+\.

 32   Using Another Editor
---   --------------------
      The instructions for using another editor are not complete.  You can
      add any other editor to the menu.To use "Brief(R)," "Epsilon(TM)," or
      the Microsoft "M" Editor, follow these steps:

      Open the Utility menu and choose Customize Menu.  Highlight "Custom
      &Editor" and choose the <Edit> button.  In the text box for Path
      Name, list the path and the name of the editor.  For example, \BIN\B,
      \EDITORS\EPS, or MYDIR\M.  It is not necessary to include the .EXE
      extension.  Next, follow the appropriate steps below:

      Brief
      -----
      1. Set the Arguments command line to:

         -m"editat $LINE $COL" $FILE

      2. Add the macro below to your Brief macro file:

         ;*** editat -- interface to QC Utility.Edit menu
         ; SYNOPSIS
         ; b -m"editat $LINE $COL" $FILE
         ; DESCRIPTION
         ; editat positions Brief at the specified line and column in the
         ; current file.  It is invoked from the command line (i.e -m).
         ;*
            (macro editat
               (
                  (int line col)

                  (get_parm 0 line)
                  (get_parm 1 col)
                  (move_abs line col)
               )
            )

      Epsilon
      -------
      Set the Arguments command line to:

         $FILE +$LINE

      M Editor
      --------
      Set the Arguments command line to:

         /e "Arg \"$LINE\" Mark" $FILE

 37   About Directories
---   -----------------
      When you're opening or saving a file, you can move to subdirectories
      by double-clicking (mouse) or pressing ENTER (keyboard) on the name
      of the directory in the Drives/Dirs list (see Figure 3.4).  To move
      to the parent directory, select the two periods ("..") at the top of
      the list.

      When you exit QuickC, you return to the directory where you started
      (the "default directory"), regardless of how many other directories
      you may have accessed.

      QuickC puts all .OBJ object files and .EXE executables in the default
      directory.  For example, if you run QuickC from the \ZEBRA directory
      and open the file TAPIR.C from the \AARDVARK directory, the files
      TAPIR.OBJ and TAPIR.EXE are created in the ZEBRA (NOT the AARDVARK)
      directory when you compile the program because ZEBRA is the default
      directory.  If you'd prefer to keep all related files in the same
      place, choose Run DOS Command from the Utility menu and type CHDIR
      AARDVARK.  The "change directory" command redirects the object and
      executable files to the other directory.

 51   Error Help
---   ----------
      Add this note to the section on Error Help:

      Note: You can ask for help on all error messages and dialog boxes
      except this one:

                         Warning:
                 Too many open help files
      Backtrace list and bookmarks will be invalidated
      ------------------------------------------------
                                       <OK>   <Cancel>

      Choosing <OK> lets you access the new help file, invalidating the
      backtrace list and bookmarks.  Choosing <Cancel> aborts the request
      for Error Help, leaving the backtrace list and bookmarks intact.

      This warning appears only when you have 20 files open at the same
      time, which is unlikely to occur.  You can't ask for help about the
      message because the help system can't open any help files.

 52   Error Help
---   ----------
      Delete the paragraph that begins with "Move to the Errors window..."

 53   Help on Help and TSRs
---   ---------------------
      SHIFT+F1 is the shortcut key for Help on Help.  If you have a
      terminate-and-stay-resident (TSR) utility such as the Norton Guides
      installed and you invoke that program with SHIFT+F1, then you can't
      use the SHIFT+F1 shortcut to QuickC's Help on Help.  Choose Help on
      Help from the Help menu instead.  Or change the key that triggers
      the TSR.

 55   The LEARN.COM Program
---   ---------------------
      The \QC2\TUTORIAL directory holds the LEARN.COM program.  You can run
      it from the command line or choose the "Learn QuickC" command from
      QuickC's Utility menu.  QuickC searches the current path and runs the
      first LEARN.COM program it finds, which means that users of Microsoft
      Word may see the MS-Word tutorial instead of the QuickC tutorial if
      the Word directory is first in the path.  If this happens to you,
      either switch to the \QC2\TUTORIAL directory and type LEARN, or run
      the NEW-VARS batch file.



===================< Part 2: Notes on "C for Yourself" >===================


Page  Note
----  ----

 19   Passing by Value
---   ----------------
      In the third paragraph on page 19, the phrase

         Since the variables in the factor function are local

      should read:

         Since the variables in the showme function are local

 33   Example Program FOR.C
---   ----------------------
      If you compile the program FOR.C and run it from the DOS command
      line, it conflicts with the DOS FOR command. To eliminate the
      conflict, rename the file FOR.EXE as QCFOR.EXE.

 37   Example Program IF.C
---   --------------------
      If you compile the program IF.C and run it from the DOS command line,
      it conflicts with the DOS IF command.  To eliminate the conflict,
      rename the file IF.EXE as QCIF.EXE.

 48   Type Qualifiers
---   ---------------
      The fourth paragraph in this section is incorrect.  A long double
      value is the same size as a double.  It contains 8 bytes, not 10.  It
      expresses a floating-point number with at least 15 digits of
      precision, not 19.  Table 4.1 on page 49 should also be corrected.

 54   Declaring and Initializing Arrays
---   ---------------------------------
      You can always initialize an array with constants.  If you initialize
      an automatic (local) array with variables whose values or addresses
      are unknown to the compiler at compile time, you must include the
      size of the array.  For example:

      #define FIVE 5
      main()
      {
         int i = 5;
         int abc[] =  { 5, FIVE };  /* constants always work */
         int def[] =  { i, i };     /* ERROR: variables in unsized array */
         int ghi[2] = { i, i };     /* sized array works */
      }

      WARNING: The first edition of "The C Programming Language" by
      Kernighan and Ritchie did NOT allow you to initialize automatic
      arrays.  The ANSI standard and the second edition of K&R make
      provision for initialization by constants.  Initializing an automatic
      array with variables is a Microsoft extension to ANSI.  If you plan
      to port your program to another computer or operating system, these
      constructs may not be portable.  QuickC will issue a warning about
      initializing automatic arrays at warning level three.  The
      requirement for sized arrays is unique to QuickC -- unsized arrays
      are accepted by the Microsoft C Optimizing Compiler.

 72   Floating-Point Values
---   ---------------------
      The float data type contains four bytes, not six.

 95   The "defined" Operator
---   ----------------------
      The last sentence should read:

           In this example the conditional block executes if DEBUG is not
           currently defined:

 96   Pragmas
---   -------
      QuickC supports 4 (not 15) pragma directives.  The two examples
      listed -- "#pragma skip" and "#pragma title" -- are not supported.
      The QuickC pragmas (message, pack, check_stack, and check_pointer)
      are documented in on-line help.

105   Example Program PARRAY.C
---   ------------------------
      Change the following line:

         printf("array[%d] = %d\n", count, *ptr );

      to:

         printf("i_array[%d] = %d\n", count, *ptr );

      The PARRAY.C program in on-line help already contains this
      correction, but you may want to correct the printed listing, too.

110   Example Program PARRAY1.C
---   -------------------------
      Change the following line:

         printf("array[%d] = %d\n", count, *ptr++ );

      to:

         printf("i_array[%d] = %d\n", count, *ptr++ );

      The PARRAY1.C program in on-line help already contains this
      correction, but you may want to correct the printed listing, too.

118   Example Program SORT.C
---   ----------------------
      If you compile the program SORT.C and run it from the DOS command
      line, it conflicts with the DOS SORT command. To eliminate the
      conflict, rename the file SORT.EXE as QCSORT.EXE.

176   Example Program INPUT.C
---   -----------------------
      The "do" loop at the end of the INPUT.C program should read:

         do
         {
            c = getch();
            c = tolower( c );
         } while( c != 'y' && c != 'n' );

      The INPUT.C program in on-line help already contains this correction,
      but you may want to correct the printed listing, too.

      Note that the program ends no matter which key ('y' or 'n') you
      press.  A real program would take some action based on the value
      returned by the "getch" function.

204   Example Program SINE.C
---   ----------------------
      Replace the "switch" block with the following lines:

      switch( myscreen.adapter )
      {
         case _CGA:
            _setvideomode( _HRESBW );
            break;
         case _OCGA:
            _setvideomode( _ORESCOLOR );
            break;
         case _EGA:
         case _OEGA:
            if( myscreen.monitor == _MONO )
            _setvideomode( _ERESNOCOLOR );
            else
            _setvideomode( _ERESCOLOR );
            break;
         case _VGA:
         case _OVGA:
         case _MCGA:
            _setvideomode( _VRES2COLOR );
            break;
         case _HGC:
            _setvideomode( _HERCMONO );
            break;
         default:
            printf( "This program requires a CGA, EGA, VGA, or Hercules card\n" );
            exit( 0 );
      }

      The SINE.C program in on-line help already contains this correction,
      but you may want to correct the printed listing, too.

204   MSHERC.COM Program
---   ------------------
      If your computer has a Hercules(R) graphics adapter and you want to
      display graphics, you must run the MSHERC.COM program before running
      QuickC.  Do NOT run MSHERC.COM from QuickC's DOS Shell.

209   Example Program GRAPHIC.C
---   -------------------------
      The declaration at the beginning of GRAPHIC.C should be

         struct videoconfig screen;

      Also, change the seventh constant in the array 'modes' to
      _ERESNOCOLOR and remove the semicolon at the end of line that begins
      the "while" loop.

      The GRAPHIC.C program in on-line help already contains these
      corrections, but you may want to correct the printed listing, too.

264   Vector-Mapped Fonts
---   -------------------
      Add this note to the description of vector mapping:

      If a vector-mapped font is selected in graphics mode, any function
      affecting "_moveto" or "_lineto" will also affect the font
      ("_setlinestyle" and so on) when "_outgtext" is called.

265   Using QuickC's Font Library
---   ---------------------------
      QuickC's .FON files are identical to Windows .FON files, not .FNT
      files.

267   The _fontinfo Structure
---   -----------------------
      Change "filename[66]" to "filename[81]".

273   Using Braces in _asm Blocks
---   ---------------------------
      Disregard the part that explains how to use a backslash to continue a
      line.  The opening brace may appear on the same line or on following
      lines.  The backslash is never needed.

273   Limits on _asm Identifiers
---   --------------------------
      Never use reserved assembly words as labels, variable names, or other
      identifiers within an _asm block.  This includes words in the
      following categories:

         - ASM Opcodes such as CMP or MOV
         - Opcodes new to the 80186, 80286, and 80386 such as ARPLS or CLTS
         - Reserved operand words such as WORD or PARA
         - C library functions such as "exit" or "time".

      For example, the following code is not permitted:

         main()
         {
            int word;
            _asm { mov WORD PTR [word],ax }
         }

      The variable 'word' can be used in the C part of the program, but not
      within the assembly block.



==================< Part 3: Notes on "QuickC Tool Kit" >===================


Page  Note
----  ----

 75   /F (Set Stack Size)
---   -------------------
      The number following /F must be hexadecimal; decimal and octal are
      not allowed.

 87   /Gi (Use Incremental Compilation)
---   ---------------------------------
      Note: This information applies only to the Microsoft C Optimizing
      Compiler versions 5.1 and earlier.

      If you use QuickC's /Gi or /Li options to compile incrementally or to
      link incrementally, you may debug the files with QuickC's integrated
      debugger.

      If you own Microsoft C version 5.1 or earlier and want to use the
      CodeView debugger, do NOT use the /Gi or /Li options.

 94   /Li (Link Incrementally)
---   ------------------------
      This section should say that if you change the command line options
      that relate to linking, you must delete the .EXE file.  For example,
      if you try this:

         QCL /Gi TEST.C /link SLIBCE.LIB

      you must delete TEST.EXE before you link with the large library:

         QCL /Gi TEST.C /link LLIBCE.LIB

      The incremental linker would look at the time and date stamp of
      TEST.EXE and do nothing (because the file seems to be up to date).
      Whenever you change linker options, delete the .EXE file or use
      LINK.EXE instead of ILINK.EXE.

      This condition does not apply if you compile ("build") within the
      QuickC environment.  It affects only the QCL program that you run
      from the DOS prompt and only when you change a linker-related option.

 94   /Li Option and Expanded Memory
---   ------------------------------

      NOTE: Incremental linking uses expanded memory (as defined by the LIM
      specification, versions 3.2 and higher) if it is available.

      WARNING: If you have installed additional memory on an 80286 or 80386
      system, you may encounter problems when linking incrementally,
      especially if you have configured the board to use both extended AND
      expanded memory.  In particular, your computer may lock up if you use
      incremental link in conjunction with a Talltrees AT3 expanded memory
      board.  (Other boards may or may not be subject to this problem.)  If
      this happens, you have five choices:

      1. Contact the manufacturer of the memory board for information on
      solving this problem.

      2. Remove the Expanded Memory Manager (EMM) device driver and
      continue to link incrementally.

      3. Disable extended memory (used by VDISK) and continue to link
      incrementally.

      4. Leave the memory and device driver in place, but turn off
      incremental linking.  From the QuickC environment, choose the Options
      menu Make command and then choose the Linker Flags button.  From the
      command line, avoid the /Li option.

      5. Contact Microsoft Product Support for additional information on
      ways to work around the problem.

101   /Ze, /Za (Enable or Disable Language Extensions)
---   ------------------------------------------------
      Add the following notes to the explanation of /Ze and /Za:

      In extremely rare cases, you may want to cast a function pointer to a
      data pointer.  QuickC uses the code segment (cs:), while Microsoft C
      5.1 uses the data segment (ds:).  The program below attempts to cast
      a function pointer (pfunc) to a pointer to an int (pdata):

         main()
         {
            int (*pfunc)();
            int *pdata;

            pdata = (int *) pfunc;
         }

      The ANSI standard does not permit such casts.  When you use /Za to
      enforce ANSI compatibility, this program triggers error C2068.  When
      you use /Ze and /W3 to enable language extensions at warning level 3,
      this program generates a warning C4074.

      To maintain ANSI and C 5.1 portability, cast the function pointer to
      an int before casting it to a data pointer.  The following line is
      perfectly acceptable.  It creates no errors or warnings.

            pdata = (int *) (int) pfunc;

      A second method is to declare pfunc as a union that can act as a
      function pointer or a data pointer.

122   Creating a .COM File (/BI)
---   --------------------------
      Delete this section (5.4.2).  The linkers shipped with QuickC Version
      2.0 do not support the /BI option.

165   The $(MAKEFLAGS) Macro
---   ----------------------
      If you call NMAKE recursively with "$(MAKE) $(MAKEFLAGS)", the
      following flags are NOT preserved: A, C, D, F, P, R, S, X.

174   Differences between NMAKE and MAKE
---   ----------------------------------
      Note: If you don't own QuickC Version 1, skip this section.

      Section 7.5 explains how to convert DOS MAKE files for use with
      NMAKE. Section 7.6 explains how to interchange QuickC 2.0 program
      lists (.MAK files) with NMAKE description files.  The discussion
      below covers conversion of QuickC Version 1 program lists to NMAKE
      files.

      It's fastest and easiest to delete the old .MAK files and create new
      ones from within QuickC.  However, if you wish to alter a Version 1
      program list by hand, follow these instructions:

      Converting to NMAKE Format
      --------------------------
      To use QuickC 1.00 and 1.01 program lists (.MAK files) with the
      stand-alone NMAKE utility, follow these steps:

      1. Make a backup copy of the .MAK file.

      2. Delete or comment out (precede with a #) the first two lines of
      the .MAK file.  These lines define inference rules.

      3. Add the following as the first target in the file:

            all : target.exe

      (Replace "target.exe" with the name of the final target in the file.)
      Spell the target name with lowercase characters only.

      4. Change the initial capital letter of the final target in the file
      to a lowercase letter.

      Converting to 2.0 Format
      --------------------------
      If you want to use the resulting file within the QuickC 2.0
      environment, you must also follow these steps:

      1. Run QuickC.

      2. Choose Set Program List from the Make menu.  Specify the .MAK file
      you just edited as the program list file.

      3. Choose Edit Program List from the Make menu and immediately choose
      <Save List>.

179   Help File Formats
---   -----------------
      In the section on QuickHelp, add this sentence:

      Note: The QuickHelp format supported by QuickC is a subset of the
      format supported by the OS/2 QuickHelp utility.  QuickC does not
      support the complete set of OS/2 QuickHelp dot commands.

182   /K[filename]
---   ------------
      Add this description to the table:

      Optimizes .HLP file sizes.  The /K option specifies a file that
      defines keyword separator characters.  These characters separate
      words in the file before HELPMAKE compresses it.

      The file used to create QC.HLP is listed below.  (The first space is
      a blank character and it indicates that a space separates words.)

       "&'()*+,.-/:=?@[\]^_`{|}~\177

      The other characters specify other separators.  The angle brackets
      and pound sign are excluded, which gives a slightly better
      compression of phrases such as "#include <stdio.h>".

      Without the /K option, HELPMAKE sees these tokens to compress:
             #
             include
             <
             stdio
             .
             h
             >

      With the /K option, HELPMAKE sees the following tokens to compress:
             #include
             <stdio
             .
             h>

      Repeated over the entire QC.HLP file, the small savings add up.

185   Creating a Help Data Base
---   -------------------------
      Add these paragraphs to step 4 at the top of the page:

      If you would prefer not to append the new file to QC.HLP, you may set
      the environment variable HELPFILES to equal the help files you've
      created.  For example, to force on-line help to search HANSEL.HLP and
      GRETEL.HLP (in addition to the standard help files), enter this
      command line or add it to your AUTOEXEC.BAT:

         SET HELPFILES=HANSEL.HLP;GRETEL.HLP

      QuickC's on-line help system can search up to 10 files.  This
      includes the four standard help files (QC.HLP, QCENV.HLP, ERRORS.HLP,
      and GRAPHICS.HLP) and up to six user-defined files.

190   Example
---   -------
      Delete the characters "@EX =" from the example.

225   Appendix D, Error-Message Reference
---   -----------------------------------
      Appendix D lists the following errors that the compiler never
      generates:

         page 229     C1026
         page 229     C1027
         page 233     C2002
         page 234     C2011
         page 240     C2083
         page 244     C2135
         page 252     C2428
         page 253     C4001
         page 255     C4025
         page 257     C4052

      In addition, some error numbers have changed.  The on-line help
      descriptions are correct, but Appendix D is incorrect.  Insert the
      following notes:

         page 228     C1011    See C1065.
         page 232     C1064    See C1067.
         page 235     C2027    See C2088.
         page 237     C2041    See C2020.
         page 249     C2201    See C2073.
         page 249     C2202    See C2183.
         page 249     C2203    See C2184.
         page 249     C2204    See C2186.

      C5.1 users may notice slight changes to these error messages:
         C2035, C2077, C2095, C2133, C2174, C2182

229   Error Message C1025
---   -------------------
      The error message below is new and should be added to page 229:

      C1025   compiler terminated by user

              The compiler was stopped by the user.

248   Error Message C2176
---   -------------------
      The message and explanation for error C2176 should read:

      C2176   static huge data not supported

              You cannot declare data items with the huge attribute in the
              QuickC environment. Declare a huge pointer to the data item
              instead.

248   Error Message C2177
---   -------------------
      Add the following note to error C2177:

      This error may occur when you attempt to assign to an unsigned long
      integer a decimal constant in the range +2147483647 to +4294967295.
      For example, the following line generates an error:

         unsigned long debt = 3000000000;

      but either of these lines works:

         unsigned long debt = 2000000000 + 1000000000;
         unsigned long debt = 0xB2D05E00;

252   Error message C2418
---   -------------------
      The following error message is new and should be added to page 252:

      C2418   'identifier' : not in a register

               This error occurs when an in-line assembler instruction
               references a variable with register storage class that has
               not actually been allocated in a register.  To correct this,
               remove the register keyword from the variable definition and
               make sure that this instruction is legal with a memory
               operand.

      For example:

         main()
         {
            register long regvar1;   /* _asm references are illegal */
            register int regvar2;
            register int regvar3;
            register int regvar4;

            _asm
            {
               les regvar2,regvar1   /* error */
               mov regvar2,regvar4   /* error */
            }
         }

252   Error Message C2429
---   -------------------
      The following error message is new and should be added to page 252:

      C2429   <label> : illegal far label reference

              This error affects only people using in-line assembler.  It
              is illegal to do a far call or a far jump to a label.  It
              should never be necessary to do this, since labels have
              function scope and a function cannot be larger than a
              segment.

263   Warning Message C4118
---   ---------------------
      The QuickC preprocessor accepts but ignores the following pragmas:

         #pragma comment (compiler)
         #pragma comment (lib)
         #pragma comment (exestr)
         #pragma comment (user)

      Using these constructs results in warning message C4118, but only at
      warning level 3.  In all other cases, C4118 is a level 1 warning.

264   Warning message C4407
---   ---------------------
      Warning C4407 (operand size conflict) has been changed from level 1
      to level 2.

308   Error Message U1051
---   -------------------
      The word "[targets]" should be on the same line as the rest of the
      message.



============< Part 4: Notes for Windows and OS/2 Programmers >=============


      For Windows Programmers
-----------------------------

  1   Special Instructions for Linking
---   --------------------------------
      If you own the Windows Software Development Kit (SDK) and want to use
      QuickC 2.0 to write Windows programs, you cannot use either the
      standard QuickC linker or the SDK linker.  Instead, replace the
      QuickC linker LINK.EXE (version 4.06, which is installed by the SETUP
      program) with the 120K LINK.EXE file (version 5.02 of the Microsoft
      Segmented-Executable Linker for MS-DOS, Windows, and OS/2).  You can
      find it on the distribution disk labeled "Learning the Microsoft
      QuickC Environment."  This linker works with QuickC, C 5.1, and the
      Software Development Kit.  It replaces all earlier versions of the
      linker.

  2   Linker Warning Message L4024
---   ----------------------------
      L4024  name : multiple definitions for export name

             This warning occurs if you declare a name exported both in the
             .DEF file and with the _export keyword in a .C file.  It can
             be safely ignored.  You can eliminate it by removing one or
             the other of the export declarations for the name.


      For OS/2 Programmers
--------------------------

  1   QCL Command Options
---   -------------------
      QCL supports several command options for compatibility with OS/2.
      These options may not work correctly if you have not installed OS/2
      or the Microsoft C Optimizing Compiler, Version 5.1 or later:

      The /Fb Option
      --------------
      If you have installed the C Optimizing Compiler, you can use the /Fb
      option to create bound applications. See Section 4.3.8 of the
      "Microsoft QuickC Tool Kit" or your Microsoft C Optimizing Compiler
      documentation for details.

      If the Optimizing C Compiler is not installed, using /Fb causes QCL
      to prompt you to insert BIND.EXE into drive A.  BIND.EXE is not
      shipped with QuickC.

      The /Lp Option
      --------------
      The /Lp option links programs for OS/2 protected mode.  If you have
      installed the C Optimizing Compiler, you can use /Lp to create
      protected mode applications.  See Section 4.3.21 of the "Microsoft
      QuickC Tool Kit" or your Microsoft C Optimizing Compiler
      documentation for details.  Note that you should not use the standard
      QuickC linker.  Instead, use the alternate Windows-compatible linker
      mentioned at the beginning of Part 4 of README.DOC or use the linker
      from the Optimizing Compiler.

      If you do not have the C Optimizing Compiler, QCL accepts the /Lp
      option without error. At link time, however, QCL fails because it
      cannot find the OS/2 protected mode library.

      The /Zr Option
      --------------
      If you own the Microsoft C Optimizing Compiler, Version 5.1, and
      you're writing OS/2 Protected Mode applications, do not use the
      QuickC /Zr option.

  2   Searching for Include Files
---   ---------------------------
      The following command line is valid even if you do not have the OS/2
      software, as described previously:

         QCL /Lp /c myfile.c

      If myfile.c includes an OS/2 include file, however, QCL returns the
      following error:

         C1068  cannot open file 'name.h'

      where 'name.h' is the name of the OS/2 include file.

  3   Linker Warning Message L4024
---   ----------------------------
      L4024  name : multiple definitions for export name

             This warning occurs if you declare a name exported both in the
             .DEF file and with the _export keyword in a .C file.  It can
             be safely ignored.  You can eliminate it by removing one or
             the other of the export declarations for the name.

  4   Spurious Error: __aDBused Referenced but not Defined
---   ----------------------------------------------------
      To eliminate this error, link with the DBUSED.OBJ file.  Or use the
      LIB utility to add DBUSED.OBJ to your combined libraries.



========< Part 5: Notes on "QuickAssembler Programmer's Guide" >===========


Page  Note
----  ----

 xi   Running SETUP Before Using Help
---   -------------------------------
      Before using the Quick Advisor, make sure you run the SETUP
      program. This program combines files on different disks to build
      QA.HLP, which contains help on assembly language as well as DOS
      and BIOS interrupt functions. If you accidentally delete this
      file, you can recreate it with the following procedure:

      1. Copy QA.HLP and QA1.HLP from the release disks to a directory
	 on your hard disk.

      2. Append QA1.HLP onto the end of QA.HLP by giving the following
	 DOS command:

	 COPY /B QA.HLP+QA1.HLP

      3. Delete QA1.HLP.

      4. Move QA.HLP to the same directory as your other help files.

 xi   Expanding Environment Space
---   ---------------------------

      QuickAssembler for QuickC makes use of certain environment
      variables, such as HELPFILES. However, these variables are stored
      in an area of memory called the "environment space." You may need
      to expand this memory to use the new environment variables
      successfully.

      If you run DOS 3.2 or later, you can set the environment space
      with the DOS SHELL command. For example, the following command
      sets the environment size at 3000 bytes when placed in CONFIG.SYS:

      SHELL=COMMAND.COM /E:3000 /p

      Consult your DOS manual for more information.

 xi   Temporary Files and the TMP Environment Variable
---   ------------------------------------------------
      If you do not have a TMP environment variable set, the linker
      prints the following message when it creates a temporary file:

      temporary file <filename> created

      To avoid getting this message, set the TMP environment variable to
      the name of a drive and directory. This drive should have some free
      space. For example, the following command line sets C:\TEMP as the
      directory where the linker places temporary files:

      SET TMP=C:\TEMP

      For convenience, place this command (or a similar one) in your
      AUTOEXEC.BAT file to execute it automatically.

  6   Terminating the Program with .EXIT
---   ----------------------------------
      When you use the .STARTUP directive, the recommended method for
      terminating the program is to use the .EXIT directive. With
      stand-alone assembly programs, you must explicitly terminate
      or the processor will execute meaningless instructions beyond the
      end of the program.

      The .EXIT directive has the following syntax:

      .EXIT [exitcode]

      in which exitcode is an optional register, memory location, or
      constant that contains a value to return to DOS. This value must
      not be larger than one byte.

      When you use this directive, the assembler generates instructions
      that call DOS function 4CH (Exit with Return Code). You can use
      another method to terminate the program if you wish. The assembler
      generates an advisory warning if you use .STARTUP without .EXIT.

      The .EXIT directive requires that .MODEL was previously used.

      Within the environment, the assembler generates an advisory
      warning message if you use .STARTUP without using .EXIT. Outside
      the environment, the assembler does not generate this message.


  7   Effect of ILINK on Building a Program
---   -------------------------------------
      By default, the quick environment invokes ILINK to link programs.
      ILINK, in turn, requires that a program have a default data
      segment (it may be empty). To meet this requirement, you can do
      any of three alternatives:

      1) Declare a data segment with .DATA if using simplified segment
	 directives

      2) Declare a group named DGROUP

      3) Turn Incremental Link off in the Linker Flags dialog box

      The use of ILINK imposes some other requirements on assembly-
      language programs:

      1) You cannot have a segment with the AT attribute.

      2) Avoid depending on distances between segments being fixed. Some
	 programs calculate the distance between two segments and then
	 use this value elsewhere. When ILINK is in use, segment-address
	 arithmetic is unpredictable.

      3) The DUP operator cannot have a program address as an operand.
	 For example, the following statement is compatible with ILINK:

	 myarr	    DW	    10 DUP (5)

	 However, the next statement is not compatible with ILINK, even
	 though it is supported by the assembler:

	 myarr	    DW	    10 DUP (myproc)

  7   Searching for Include Files
---   ---------------------------
      When building and running a program, note that the assembler looks
      for include files in the following order:

      1) The directory in which the current source file is located
      2) Directories specified with the /I command-line option
      3) The current directory (as recognized by the environment)
      4) Directories specified in the INCLUDE environment variable

  9   Assembling from the Command Line
---   --------------------------------
      QCL does not report some warning messages reported inside the quick
      environment. QCL does not warn you if you use .STARTUP without .EXIT,
      and it does not warn you when you pass the /AT option to the C compiler.
      In the latter case, the compiler interprets /AT (tiny model) as
      equivalent to /AS (small model).

      Small-model code can often be linked to create a tiny-model
      program because by default both tiny model and small model use
      near pointers for all references. However, references to segment
      addresses or use of far pointers (permitted in small model) is not
      compatible with .COM format. For this reason, programs that
      require the C start-up code or floating-point library cannot be
      part of a tiny-model program.

 14   Specifying Debug Expressions
---   ----------------------------
      The quick environment now supports an optional display-format
      character for examining arrays. You can add a suffix to any
      expression for the Watch window as follows:

      expression,nf

      in which n is a number and f is a format specifier (such as i, x,
      d, or a). Both are optional. The use of n displays the expression
      as if it were an array. If the expression is already an array,
      then the use of n displays the array as if it were an array of a
      higher dimension. The assembler does not type any symbol as an
      array. Thus, the use of n with a variable declared in assembly
      always displays the variable as an array of one dimension.

      The optional f display-format specifier only affects the format
      in which each member of the array is displayed.

      The Watch window determines the type of array from the expression
      or from BY, WO, or DW if used. If WVAR is declared as type WORD
      (or "int" in C), then WVAR,5x displays the first five words at the
      address of WVAR. The "x" specifies hex format. BY WVAR,5x displays
      the first five bytes at the address of WVAR. Each byte is
      displayed as if it were a hexadecimal word-sized value.

 56   The PROC Directive
---   ------------------------------
      The PROC directive sets the BP register to point to a procedure's
      frame, but only if you use a parameter list or the LOCAL directive.

 82   Using Full Segment Definitions
---   ------------------------------
      The program example on this page should declare class name 'CODE'
      for the segment definition:

      _TEXT     SEGMENT  'CODE'

      The class name 'CODE' is necessary if you want to debug the
      module. The assembler issues a warning message if you assemble a
      code segment without this class name. If you use simplified
      segment directives, the code segments automatically have this
      class name.

109   Defining Segment Combine Types
---   ------------------------------
      The combine type describes how the linker combines segments, but
      does not affect the assembler itself. Within any given module, the
      assembler concatenates segments with the same name. Thus, segments
      with the COMMON attribute are overlapped only if they are in
      different modules.

383   Assembling with Two Passes
---   --------------------------
      In addition to the options listed in Appendix B, QCL supports the
      /P2 option, which specifies two-pass assembly. The /P1 option
      specifies one-pass assembly and is now the default. Two-pass
      assembly is slower than one-pass assembly, but enables some
      language-specific features (such as IF1 and IF2) that rely on two
      passes.

383   Removing Copyright Message
---   --------------------------
      In addition to the options listed in Appendix B, QCL supports the
      /nologo option, which prevents QCL from printing the product name
      and copyright information. QCL also prints a warning message when a
      nonstandard version of DOS is detected. The /nologo option prevents
      this message from being printed.

386   Using /AT to Generate a .COM File
---   ---------------------------------
      If you use QCL to generate a .COM file but do not use /AT, the
      linker may produce a file with an .EXE extension. This file is
      really in .COM format. It should be renamed immediately. You can
      prevent this situation by using the /AT option, or by using the
      /Fe option to explicity give the name of the output file. For
      example, the following command line produces a file with a .EXE
      extension:

      QCL sample.asm /link /TINY

      However, the following command lines each produce a file with a
      .COM extension:

      QCL /AT sample.asm /link /TINY
      QCL /Fesample.com sample.asm /link /TINY

392   Line-Number Index in Listing File
---   ---------------------------------
      The line-number index generated by /Sq (and generated by default
      within the environment) lists correspondences between source-file
      lines and listing-file lines. This index, placed at the end of the
      listing file, is read and interpreted by the quick environment.
      You should avoid writing utilities that read this index. The
      format of the line-number index is subject to change without
      notice.



===================< Part 6: Notes on On-line Help >=======================


Contents (ASM) Screen
---------------------
To get a list of all example programs, see the QASAMPLE.DOC file. This
file gives an overview of what sample code is provided and how it is
organized by file. The programs are FILEDEMO, MATHDEMO, and MISCDEMO.
Each program has a main module written in C and an assembly module that
contains support routines (FILE.ASM, MATH.ASM, or MISC.ASM). Finally,
the file COMMON.ASM contains assembly-language procedures called by all
programs.

Sample Code (Example) Screens
-----------------------------
To see a procedure mentioned in the comments of another procedure,
simply move the cursor to the name of the procedure and press F1 (or
move the mouse pointer to the name and click the Right mouse button).

Linker Warning Message L4067: Possible .COM/.EXE inconsistency
--------------------------------------------------------------

This message indicates that you either selected Generate .COM File and
did not specify .MODEL TINY in your source code, or you turned Generate
.COM FILE off and did specify .MODEL TINY. You may also receive this
message if you select Generate .COM File while using full segment
definitions. As long as you use the required statements to successfully
generate a COM file, you can safely ignore this warning.

Linker Error Message L2051: start address not equal to 0x100 for tiny
---------------------------------------------------------------------

In addition to the reasons mentioned in the Help text, you can also
receive this message if you give no starting address with END. You do
not need to give this starting address if you use the .STARTUP
directive. But otherwise a starting address is required. See information
on the END directive for more information.



=========< Part 7: Additional Notes for QuickC with QuickAssembler>==========


Source of DOS and BIOS Function Information in Help
---------------------------------------------------
On-line help includes information on IBM ROM BIOS services as well as
MS-DOS service calls. The information on these topics is adapted from the
books "IBM ROM BIOS" and "MS-DOS Functions" by Ray Duncan. Both books are
published by Microsoft Press and are part of the Programmer's Quick
Reference Series.

Change to QC SAMPLES.DOC
------------------------
CHRTDEMO, included in the C samples, has been updated in the QuickAssembler
package. The files included with QuickAssembler for CHRTDEMO are

      CHRTDEMO.C
      CHRTOPT.C
      CHRTSUPT.C
      CHRTDEMO.H
      CHRTDEMO.MAK

Math Coprocessor Instructions in .ASM Programs
----------------------------------------------
If you do not have a math coprocessor chip, you must use the /FPi option
when assembling code for emulated floating-point instructions. If the switch
is omitted, your assembly-language programs may hang your machine.
 1:1