home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / ms_sh23s.zip / dos4gw.doc < prev    next >
Text File  |  1994-08-26  |  12KB  |  300 lines

  1.         Configuring DOS/4GW
  2.  
  3. 1.  Introduction
  4.  
  5.     The DOS/4GW DOS extender, used by the 32-bit version of the shell, is a
  6.     royalty-free DOS extender from Rational Systems.  It must be placed in a
  7.     directory in %PATH.
  8.  
  9.     It is controlled by 3 environment variables:
  10.  
  11.     DOS4G    - Suppresses printout of DOS/4GW startup message.
  12.     DOS16M    - Controls how 32-bit memory is used and accessed.
  13.     DOS4GVM    - Enables and controls virtual memory.
  14.  
  15.  
  16. 2.  Suppressing the DOS/4GW Banner
  17.  
  18.     The banner that is displayed by DOS/4GW at startup can be suppressed by
  19.     setting the environment variable DOS4G to quiet.  The 32-bit version of
  20.     the shell does this automatically.
  21.  
  22.  
  23. 3.  Changing the Swtich Mode Setting
  24.  
  25.     In almost all cases, DOS/4GW programs can detect the type of machine
  26.     that is running and automatically choose an appropriate real to
  27.     protected mode switch technique.  For the few cases in which the
  28.     default setting does not work, the DOS16M environment variable allows
  29.     the user to override the default setting.  The DOS16M variable takes
  30.     values of the form:
  31.  
  32.      [<switch_mode>][@<start_address>[-<end_address>]][:<size>]
  33.  
  34.     The "<switch_mode>" value, which MUST be specified if you have an NEC
  35.     98-series, Fujitsu FMR-60,-70, Hitachi B32, or OKI if800 machine, can
  36.     take one of the following values:
  37.  
  38.     Value      Meaning
  39.        --------   -------------------------------------------------------------
  40.     0      Use DPMI to access 32-bit memory (automatically set if
  41.           present).
  42.     1      Use a method specific to the NEC 98-series machine.  You
  43.           MUST specify a start/stop range of memory to use.
  44.     2      Use a method specific to the PS/2 (automatically set if
  45.           necessary).
  46.     3      Use a method specific to a generic 386/486 machine
  47.           (automatically set if necessary).
  48.     INBOARD   Use a method specific for a 386 with an Intel Inboard
  49.           (automatically set if necessary).
  50.     5      Use a method specific to the Fujitsu FMR-70 machine.  You
  51.           MUST specify a start/stop range of memory to use.
  52.     11      Use VCPI to access 32-bit memory (automatically set if
  53.           present).
  54.     14      Use a method specific to the Hitachi B32 machine.  You
  55.           MUST specify a start/stop range of memory to use.
  56.     15      Use a method specific to the OKI if800 machine.  You MUST
  57.           specify a start/stop range of memory to use.
  58.     16      Use a method specific to PS/55s.  This setting may be needed
  59.           for some PS/55s, and note that this is NOT automatically
  60.           detected and used.
  61.  
  62.     Note that, for most machines, the correct value for "<switch_mode>" is
  63.     automatically detected and used.
  64.  
  65.  
  66. 3.1 Fine Control of Memory Usage
  67.  
  68.     The "<start_address>" and "<end_address>" values specify a range of
  69.     extended memory to use.  This is only necessary if neither DPMI nor
  70.     VCPI is available (these values are ignored if DMPI or VCPI is available).
  71.     Values can be specified as decimal or hexadecimal (prefixed with "0x"),
  72.     and are assumed to be values in kilobytes, unless an "M" (for "megabytes")
  73.     is appended to the end of the number.
  74.  
  75.     The "<size>" value specifies the maximum amount of memory that can be
  76.     allocated.  Values can be specified as decimal or hexadecimal (prefixed
  77.     with "0x"), and are assumed to be values in kilobytes, unless an "M"
  78.     (for "megabytes") is appended to the end of the number.
  79.  
  80.     If both a memory range ("<start_address"/"<end_address>") and a "<size>"
  81.     are given, the more restrictive of the two are used.
  82.  
  83.     Examples:
  84.  
  85.     set DOS16M=1@2m-4m    Mode 1, for NEC 98-series machines, and
  86.                 use extended memory between 2 and 4 MB.
  87.  
  88.     set DOS16M=:1M        Use the last full megabyte of extended
  89.                 memory, or as musch as available limited
  90.                 to 1MB.
  91.  
  92.  
  93.     set DOS16M=@2M        Use any extended memory above 2MB.
  94.  
  95.     set DOS16M=@0-5m    Use any available extended memory between 0
  96.                 (really 1) and 5 MB.
  97.  
  98.     set DOS16M=:0        Use no extended memory.
  99.  
  100.  
  101. 3.2 Using Extra Memory
  102.  
  103.     Some machines contain extra non-extended, non-conventional memory, just
  104.     below 16MB.  When running on a Compaq 386, DOS/4GW will automatically
  105.     use this memory because the memory is allocated according to a certain
  106.     protocol, which DOS/4GW follows. Other machines have no protocol for
  107.     allocating this memory.  To use the extra memory that may exist on
  108.     these machines, set DOS16M with the + option.
  109.  
  110.     set DOS16M=+
  111.  
  112.  
  113. 3.3 Setting Run-time Options
  114.  
  115.     The DOS16M environment variable sets certain runtine operions for all
  116.     DOS/4GW programs running on the same system.  To set the environment
  117.     variable, the syntax is
  118.  
  119.     DOS16M=[switch_mode_settings]^options
  120.  
  121.     These options are:
  122.  
  123.     0x01    Check the A20 line.  This option forces DOS/4GW to wait
  124.         until the A20 line is enabled for switching to protected
  125.         mode.  When DOS/4GW switches to real mode, this option
  126.         suspends your program's execution until the A20 line is
  127.         disabled, unless an XMS maanger is active.  If an XMS
  128.         manager is running, the program waits until the A20 line is
  129.         restored to the state it had when the CPU was last in real
  130.         mode.  Specify this option if you have a machine that runs
  131.         DOS/4GW, but is not truly AT-compatible.
  132.  
  133.     0x02    Prevent initialisation of VCPI.  By default, DOS/4GW
  134.         searches for a VCPI server and if one is present, forces
  135.         it on.  This option is useful if your application does not
  136.         use EMS explicitly, is not a resident program, and may be
  137.         used with 386-based EMS simulator software.
  138.  
  139.     0x04    Directly pass down keyboard status calls.  When this option
  140.         is set, status requests are passed down immmediately and
  141.         unconditionally.  When disabled, pass-downs are limited so
  142.         the 8042 auxiliary processor does not become overloaded by
  143.         keyboard polling loops.
  144.  
  145.     0x10    Restore only changed interrupts.  Normally, when a DOS/4GW
  146.         program terminates, all interrupts are restored to the
  147.         values they had at the time of program startup.  When you
  148.         use this option, only the interrupts changed by the DOS/4GW
  149.         program are restored.
  150.  
  151.     0x20    Set new memory to 00.  When DOS/4GW allocates a new segment
  152.         or increases the size of a segment, the memory is zeroed.
  153.         This can help you find bugs having to do with uninitialised
  154.         memory.  You can also use it to provide a consistent
  155.         working environment regardless of what programs were run
  156.         earlier.  This options only affects segment allocation or
  157.         expansions that are made through the DOS/4GW kernel, by DOS
  158.         functions 48H or 4AH.  This option does not affect memory
  159.         allocated with a compiler's malloc function.
  160.  
  161.     0x40    Set new memory to FF.  When DOS/4GW allocates a new segment
  162.         or increases the size of a segment, the memory is set to
  163.         0xFF bytes.  This can help you find bugs having to do with
  164.         uninitialised memory.  This options only affects segment
  165.         allocation or expansions that are made through the DOS/4GW
  166.         kernel, by DOS functions 48H or 4AH.  This option does not
  167.         affect memory allocated with a compiler's malloc function.
  168.  
  169.  
  170.     0x80    New selector rotation.  When DOS/4GW allocates a new
  171.         selector, it usually looks for the first available (unused)
  172.         selector in numerical order, starting with the highest
  173.         selection used when the program was loaded.  When this
  174.         option is set, the new selector search begins after the
  175.         last selector that was allocated.  This causes new
  176.         selectors to rotate through the range.  Use this option to
  177.         find references to stale selectors.
  178.  
  179.  
  180. 3.4 Controlling Address Line A20
  181.  
  182.     This section explains how DOS/4GW uses address line 20 (A20) and
  183.     describes the related DOS16M environment variable settings.  It is
  184.     unlikely that you will need to use these settings.
  185.  
  186.     Because the 8086/8 chips have a 20-bit address space, their highest
  187.     addressable memory location is 0xfffff.  If you specify an address of
  188.     0x100000 or greater, which would require the twenty-first bit to be
  189.     set, the address is wrapped round to zero.  Some parts of DOS depend on
  190.     this wrap, so on the 802/386, the twenty-first address bit is disabled.
  191.     TO address extended memory, DOS/4GW enables the twenty first bit (the
  192.     A20 line).  The A20 line must be enabled for the CPU to run in
  193.     protected mode, but it may either be enabled or disabled in real mode.
  194.  
  195.     By default, when DOS/4GW returns to real mode, it disables the A20
  196.     line.  Some software depends on the line being enables.  DOS/4GW
  197.     recognises the most common software in the class, the XMS managers
  198.     (HIMEM.SYS), and enables the A20 line when it returns to real mode if
  199.     an XMS manager is present.  For other software that requires the A20
  200.     line to be enabled, use the A20 option which makes DOS/4GW retores the
  201.     A20 line to its previous setting before DOS/4GW entered protected mode.
  202.     Set the environment variable as follows:
  203.  
  204.     set DOS16M=A20
  205.  
  206.     To specify more than one option on the command line, separate the
  207.     options with spaces.
  208.  
  209.     The DOS16M variable also lets you specify the length of the delay
  210.     between a DOS/4GW instruction to change the status of the A20 line and
  211.     the next DOS/4GW operation.  By default, this delay is 1 loop
  212.     instruction when DOS/4GW is running on a 386 machine.  In some cases,
  213.     you may need to specify a longer delay for a machine that will run
  214.     DOS/4GW, but is not truely AT-compatible.  To change the delay, set
  215.     DOS16M to the desired number of loop instructions, preceded by a comma:
  216.  
  217.     set DOS16M=,10
  218.  
  219.     sets the number of loops to 10.
  220.  
  221.  
  222. 4.  Controlling the Virtual Memory Manager
  223.  
  224.     The DOS4GVM variable is used to enable and control virtual memory.  Note
  225.     that, within enhanced-mode Windows, the DOS/4GW extender will use the
  226.     virtual memory provided by Windows, and will ignore the DOS4GVM environment
  227.     variable.  This variable is used only outside of Windows.
  228.     The DOS4GVM variable has the following syntax:
  229.  
  230.     DOS4GVM=[option[#value]] [option[#value]]
  231.  
  232.     A # is used with options that take values since the DOS command shell
  233.     will not accept =.
  234.  
  235.     If you set DOSGVM to 1, the default parameters are used for all
  236.     options.
  237.  
  238.     set DOS4GVM=1
  239.  
  240.  
  241. 4.1 VMM Default Parameters
  242.  
  243.     The settable parameters are (all numeric values must be specified in
  244.     kilobytes):
  245.  
  246.     MINMEM         The minimum amount of RAM managed by VMM.  The default
  247.              is 512KB.
  248.     MAXMEM         The maximum amount of RAM managed by VMM.  The default
  249.              is 4096KB (4MB).
  250.     SWAPMIN         The minimum or initial size of the swap file.  If this
  251.              is not specified, the initial size will be based upon
  252.              the "VIRTUALSIZE" parameter.
  253.     SWAPINC         The size by which the swap size grows.
  254.     SWAPNAME     The name of the swapfile.  The default name is
  255.              "DOS4GVM.SWP", and is placed in the root directory of the
  256.              CURRENT drive (not the boot drive).  Specify the
  257.              complete path name if you want to keep the swap file
  258.              somewhere else.
  259.     DELETESWAP   Whether the swap file is deleted when your program
  260.              exit.  By default the file is not deleted.  Program
  261.              startup is quicker is the file is not deleted.
  262.     VIRTUALSIZE  The size of the virtual memory space.  The default
  263.              is 16MB.
  264.  
  265.  
  266. 4.2  Changing the Defaults
  267.  
  268.     You can change the defaults in either of two ways:
  269.  
  270.     1.  Specify the different parameters values are arguments to the
  271.     DOS4GVM variable, as shown in the example below:
  272.  
  273.         set DOS4GVM=deleteswap maxmem#8192
  274.  
  275.     2.  Create a configuration file with the filetype extension .VMC, and
  276.     call that as argument to DOS4GVM as shown below:
  277.  
  278.         set DOS4GVM=@NEW4G.VMC
  279.  
  280.  
  281. 4.3  The .VMC File
  282.  
  283.     A >VMC file contains VMM parameters and setting as shown in the example
  284.     above.  Comments are permitted and are on lines by themselves with a !
  285.     in the first column.  Comments that follow an option are preceded by
  286.     white space.  Do not insert blank lines as file processing STOPS at
  287.     the first blank line.
  288.  
  289.      An example of a .VMC file is:
  290.  
  291.     ! Example .VMC file.
  292.     ! This file show the default parameter values
  293.     minmem = 512            At least 512K of RAM is required
  294.     maxmem = 4096            Uses no more than 4MB of RAM
  295.     virtualsize = 16384        Swap file plus allocated memory is 16MB
  296.     ! To delete the swapfile automatically when the program exits, add
  297.     !deleteswap
  298.     ! To store the swap file in a directory called SWAPFILE, add
  299.     !swapname = c:\swapfile\dos4gvm.swp
  300.