dos4gw.doc

来自「开放源码的编译器open watcom 1.6.0版的源代码」· DOC 代码 · 共 541 行 · 第 1/2 页

DOC
541
字号
                          DOS/4GW Configuration Guide

1 Configuring DOS/4GW


     This chapter explains how to use the DOS4G environment variable to
     suppress the banner that is displayed by DOS/4GW at startup.  It also
     explains how to use the DOS16M environment variable to select the switch
     mode setting, if necessary, and to specify the range of extended memory in
     which DOS/4GW will operate.  DOS/4GW is based on Rational Systems' DOS/16M
     16-bit Protected-Mode support; hence the DOS16M environment variable name
     remains unchanged.

1.1 Suppressing the DOS/4GW Banner

     The banner that is displayed by DOS/4GW at startup can be suppressed by
     issuing the following command:

       set DOS4G=quiet

     Do not insert a space between DOS4G and the equal sign.  A space to the
     right of the equal sign is optional.

1.2 Changing the Switch Mode Setting

     In almost all cases, DOS/4GW programs can detect the type of machine that
     is running and automatically choose an appropriate real- to protected-mode
     switch technique.  For the few cases in which this default setting does
     not work we provide the DOS16M DOS environment variable, which overrides
     the default setting.

     Change the switch mode settings by issuing the following command:

       set DOS16M=value

     Do not insert a space between DOS16M and the equal sign.  A space to the
     right of the equal sign is optional.

     The table below lists the machines and the settings you would use with
     them.  Many settings have mnemonics, listed in the column "Alternate
     Name", that you can use instead of the number.  Settings that you must set
     with the DOS16M variable have the notation req'd in the first column.
     Settings you may use are marked option, and settings that will
     automatically be set are marked auto.









                                           Changing the Switch Mode Setting   1Chapter 1
-------------------------------------------------------------------------------

+-------+---------------+-------+----------+-----------------------------------+
|       |               |       |Alternate |                                   |
|Status |Machine        |Setting|Name      |Comment                            |
+-------+---------------+-------+----------+-----------------------------------+
|auto   |386/486 w/ DPMI|0      |None      |Set automatically if DPMI is active|
|req'd  |NEC 98-series  |1      |9801      |Must be set for NEC 98-series      |
|auto   |PS/2           |2      |None      |Set automatically for PS/2         |
|auto   |386/486        |3      |386, 80386|Set automatically for 386 or 486   |
|auto   |386            |INBOARD|None      |386 with Intel Inboard             |
|req'd  |Fujitsu FMR-70 |5      |None      |Must be set for Fujitsu FMR-70     |
|auto   |386/486 w/ VCPI|11     |None      |Set automatically if VCPI detected |
|req'd  |Hitachi B32    |14     |None      |Must be set for Hitachi B32        |
|req'd  |OKI if800      |15     |None      |Must be set for OKI if800          |
|option |IBM PS/55      |16     |None      |May be needed for some PS/55s      |
+-------+---------------+-------+----------+-----------------------------------+

     The following procedure shows you how to test the switch mode setting.

       1. If you have one of the machines listed below, set the DOS16M
         environment variable to the value shown for that machine and specify a
         range of extended memory.  For example, if your machine is an NEC
         98-series, set DOS16M=1 @2M-4M.  See the section, "Fine Control of
         Memory Usage" later in this chapter for more information about setting
         the memory range.

            +--------------------+---------+
            | Machine            | Setting |
            +--------------------+---------+
            | NEC 98-series      | 1       |
            | Fujitsu FMR-60,-70 | 5       |
            | Hitachi B32        | 14      |
            | OKI if800          | 15      |
            +--------------------+---------+

         Before running DOS/4GW applications, check the switch mode setting by
         following this procedure:

       2. Run PMINFO and note the switch setting reported on the last line of
         the display.  (PMINFO, which reports on the protected-mode resources
         available to your programs, is described in more detail in the
         chapter, "Utilities".)

         If PMINFO runs, the setting is usable on your machine.

       3. If you changed the switch setting, add the new setting to your
         AUTOEXEC.BAT file.

     Note:  PMINFO will run successfully on 286 machines.  If your DOS/4GW
     application does not run, and PMINFO does, check the CPU type reported on
     the first line of the display.

2   Changing the Switch Mode Setting                                                            Configuring DOS/4GW
-------------------------------------------------------------------------------

     You are authorized (and encouraged) to distribute PMINFO to your
     customers.  You may also include a copy of this section in your
     documentation.

1.3 Fine Control of Memory Usage

     In addition to setting the switch mode as described above, the DOS16M
     environment variable enables you to specify which portion of extended
     memory DOS/4GW will use.  The variable also allows you to instruct DOS/4GW
     to search for extra memory and use it if it is present.

1.3.1 Specifying a Range of Extended Memory

     Normally, you don't need to specify a range of memory with the DOS16M
     variable.  You must use the variable, however, in the following cases:

       * You are running on a Fujitsu FMR-series, NEC 98-series, OKI
        if800-series or Hitachi B-series machine.

       * You have older programs that use extended memory but don't follow one
        of the standard disciplines.

       * You want to shell out of DOS/4GW to use another program that requires
        extended memory.

     If none of these conditions applies to you, you can skip this section.

     The general syntax is:

       set DOS16M= [switch_mode] [@start_address [- end_address]] [:size]

     In the syntax shown above, start_address, end_address and size represent
     numbers, expressed in decimal or in hexadecimal (hex requires a 0x
     prefix).  The number may end with a K to indicate an address or size in
     kilobytes, or an M to indicate megabytes.  If no suffix is given, the
     address or size is assumed to be in kilobytes.  If both a size and a range
     are specified, the more restrictive interpretation is used.

     The most flexible strategy is to specify only a size.  However, if you are
     running with other software that does not follow a convention for
     indicating its use of extended memory, and these other programs start
     before DOS/4GW, you will need to calculate the range of memory used by the
     other programs and specify a range for DOS/4GW programs to use.

     DOS/4GW ignores specifications (or parts of specifications) that conflict
     with other information about extended memory use.  Below are some examples
     of memory usage control:




                                               Fine Control of Memory Usage   3Chapter 1
-------------------------------------------------------------------------------

     set DOS16M= 1 @2m-4m    Mode 1, for NEC 98-series machines, and use
                             extended memory between 2.0 and 4.0MB.

     set DOS16M= :1M         Use the last full megabyte of extended memory, or
                             as much as available limited to 1MB.

     set DOS16M= @2m         Use any extended memory available above 2MB.

     set DOS16M= @ 0 - 5m    Use any available extended memory from 0.0 (really
                             1.0) to 5.0MB.

     set DOS16M= :0          Use no extended memory.

     As a default condition DOS/4GW applications take all extended memory that
     is not otherwise in use.  Multiple DOS/4GW programs that execute
     simultaneously will share the reserved range of extended memory.  Any
     non-DOS/4GW programs started while DOS/4GW programs are executing will
     find that extended memory above the start of the DOS/4GW range is
     unavailable, so they may not be able to run.  This is very safe.  There
     will be a conflict only if the other program does not check the BIOS
     configuration call (Interrupt 15H function 88H, get extended memory size).

     To create a private pool of extended memory for your DOS/4GW application,
     use the PRIVATXM program, described in the chapter, "Utilities".

     The default memory allocation strategy is to use extended memory if
     available, and overflow into DOS (low) memory.

     In a VCPI or DPMI environment, the start_address and end_address arguments
     are not meaningful.  DOS/4GW memory under these protocols is not allocated
     according to specific addresses because VCPI and DPMI automatically
     prevent address conflicts between extended memory programs.  You can
     specify a size for memory managed by VCPI or DPMI, but DOS/4GW will not
     necessarily allocate this memory from the highest available extended
     memory address, as it does for memory managed under other protocols.

1.3.2 Using Extra Memory

     Some machines contain extra non-extended, non-conventional memory just
     below 16MB.  When DOS/4GW runs on a Compaq 386, it automatically uses this
     memory because the memory is allocated according to a certain protocol,
     which DOS/4GW follows.  Other machines have no protocol for allocating
     this memory.  To use the extra memory that may exist on these machines,
     set DOS16M with the + option.

       set DOS16M=+

     Setting the + option causes DOS/4GW to search for memory in the range from
     FA0000 to FFFFFF and determine whether the memory is usable.  DOS/4GW does
     this by writing into the extra memory and reading what it has written.  In

4   Fine Control of Memory Usage                                                            Configuring DOS/4GW
-------------------------------------------------------------------------------

     some cases, this memory is mapped for DOS or BIOS usage, or for other
     system uses.  If DOS/4GW finds extra memory that is mapped this way, and
     is not marked read-only, it will write into that memory.  This will cause
     a crash, but won't have any other effect on your system.

1.4 Setting Runtime Options

     The DOS16M environment variable sets certain runtime options for all
     DOS/4GW programs running on the same system.

     To set the environment variable, the syntax is:

       set DOS16M=[switch_mode_setting]^options.

     Note:  Some command line editing TSRs, such as CED, use the caret (^) as a
     delimiter.  If you want to set DOS16M using the syntax above while one of
     these TSRs is resident, modify the TSR to use a different delimiter.

     These are the options:

     0x01       check A20 line -- This option forces DOS/4GW to wait until the
                A20 line is enabled before switching to protected mode.  When
                DOS/4GW switches to real mode, this option suspends your
                program's execution until the A20 line is disabled, unless an
                XMS manager (such as HIMEM.SYS) is active.  If an XMS manager
                is running, your program's execution is suspended until the A20
                line is restored to the state it had when the CPU was last in
                real mode.  Specify this option if you have a machine that runs
                DOS/4GW but is not truly AT-compatible.  For more information
                on the A20 line, see the section, "Controlling Address Line
                A20" in this chapter.

     0x02       prevent initialization of VCPI -- By default, DOS/4GW searches
                for a VCPI server and, if one is present, forces it on.  This
                option is useful if your application does not use EMS
                explicitly, is not a resident program, and may be used with
                386-based EMS simulator software.

     0x04       directly pass down keyboard status calls -- When this option is
                set, status requests are passed down immediately and
                unconditionally.  When disabled, pass-downs are limited so the
                8042 auxiliary processor does not become overloaded by keyboard
                polling loops.

     0x10       restore only changed interrupts -- Normally, when a DOS/4GW
                program terminates, all interrupts are restored to the values
                they had at the time of program startup.  When you use this
                option, only the interrupts changed by the DOS/4GW program are
                restored.


                                                    Setting Runtime Options   5Chapter 1
-------------------------------------------------------------------------------

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?