                            Using CFIG286
                            -------------

              Copyright 1991 by Phar Lap Software, Inc.


    CFIG286 allows 286|DOS-Extender switches to be configured into a
DOS-extended program. 286|DOS-Extender switches are described in the
document DOSX.TXT. This document describes how to use CFIG286 to set
286|DOS-Extender switches so that they are used each time you run a
DOS-extended program.

    As an example, if APROGRAM.EXE is a DOS-extended program, and if
you want it to use the -REALFIRST switch, then type the following
DOS command line (this assumes that both CFIG286.EXE and APROGRAM.EXE
are in the APROGRAM subdirectory):

C:\APROGRAM>cfig286 aprogram.exe -realfirst

    With square brackets such as [this] indicating optional
parameters and angle brackets such as <this> indicating required
parameters, the CFIG286 syntax is this:
    
CFIG286 [-dosxname dosx] <exe_file_name> [new_switches or -clear]

    Note that new switches such as -REALFIRST come *after* the name
of the DOS-extended program. The only CFIG286 switch which comes
before the name of the executable is -DOSXNAME. 

    The current switches in a program can be displayed by running
CFIG286 without any command-line arguments:

C:\APROGRAM>cfig286 aprogram.exe
CFIG286: 1.3 -- Copyright (C) 1986-91 Phar Lap Software, Inc.
Phar Lap program type: 286|DOS-Extender Development Version 1.3
Configured switch values:
    -realfirst

    Switches can be completely cleared from the program by using the
CFIG286 -CLEAR switch:

C:\APROGRAM>cfig286 aprogram.exe -clear

    NOTE!! If your DOS-extended application was shipped with switches
already configured in, do not use the -CLEAR switch except as
instructed by the application developer.
    
    If you try to run CFIG286 on a program that does not contain a
bound-in DOS extender, you will receive a rather cryptic error
message such as:

C:\>cfig286 hello.exe
CFIG286: Invalid config block signature: 0000 in image #1 of: hello.exe

or:

C:\>cfig286 command.com
CFIG286: Unknown executable file signature: 2DE9 in program #1 of: command.com

    Note that CFIG286 only configures in 286|DOS-Extender switches,
that is, those switches described in DOSX.TXT. Any
application-specific switches are a completely separate issue.


                          Replacing Switches
                          ------------------

    Note that CFIG286 does not "understand" RUN286 switches, and
merely places them into the target executable. This means that
switches are additive; to replace switches, you must use CFIG286 -CLEAR
and then start again. For example, what happens if you misspell a
switch?:

C:\APROGRAM>cfig286 aprogram.exe -realthirst      ! oops

C:\APROGRAM>cfig286 aprogram.exe -realfirst

    -REALFIRST did not replace -REALTHIRST. Instead, *both* are now
configured into the file:

C:\APROGRAM>cfig286 aprogram.exe
CFIG286: 1.3 -- Copyright (C) 1986-89 Phar Lap Software, Inc.
Phar Lap program type: 286|DOS-Extender Development Version 1.3
Configured switch values:
    -realthirst
    -realfirst

    If you now tried to use RUN286, it would complain about the bogus
-REALTHIRST switch. You need to use CFIG286 -CLEAR:

C:\>cfig286 \run286\bin\run286.exe -clear

C:\>cfig286 \run286\bin\run286.exe -realfirst

    NOTE!! If your DOS-extended application was shipped with switches
already configured in, do not use the -CLEAR switch except as
instructed by the application developer.
    

                        Other CFIG286 Switches
                        ----------------------

    The names of several other switches (-FIRST, -ALL, -LAST, and
-IMAGE) are displayed by the CFIG286 usage message. These switches
are not currently used.

                            - END -

