Ref: 13420023
Title: Using 80386 Memory Managers and DOS 5 with an EtherLink16 Adapter
date: 8/9/91

Copyright 3Com Corporation, 1991.  All rights reserved.


With the introduction of Microsoft's DOS 5.0, an 80386 memory manager
was made available as part of the DOS upgrade package.  The memory
manager, EMM386.EXE, can be used on any 386 computer to perform upper
memory management.  Other third party memory managers like 386MAX and
QEMM perform similar functions like EMM386.EXE but historically, these
programs have been separate from DOS itself.

To effectively use EMM386.EXE and other memory managers with 3Com's
EtherLink16 adapter, we must address some issues.  The EtherLink16
(3C507) uses shared memory transfers as its only mode of operation,
because shared memory is the fastest method of transferring data from
the adapter to the CPU's memory.  Thus, the adapter is always enabled to
use a block of upper memory.  The block's size can be varied between 16,
32, 48 and 64 KB using the 3C507.EXE diagnostic program (64 KB is the
default setting), but it cannot be turned off.

The block of memory defaults to a starting address of D000 and goes to
E000.  Since there will always be some portion of memory being used in
the upper memory blocks (UMB), some conflicts may arise between the memory
manager and the RAM being used by the adapter.  To alleviate this problem,
a parameter must be added for the memory manager to exclude the range of
memory that the adapter is using:

   *  For EMM386.EXE, using the defaults that the adapter is set to,
      add the parameter x=d000-e000 to the end of the line.

   *  For 386MAX, add the parameter ram=d000-e000.

   *  For QEMM, consult the QEMM documentation for the appropriate
      parameter.


Maximizing Your UMB Configuration

Here are some suggestions for getting as much memory back as possible to
load drivers high.  Computers differ in the hardware that resides in the
area between 640 KB and 1 MB of base memory, so these are general
guidelines only:

1.  Use the smallest RAM size that the EtherLink16 allows and place the
starting address of the block of RAM at one end of your upper memory area.
For example, use a 16 KB RAM size starting at address C800 and exclude the
range C800-CC00 with the exclusion statement for the memory manager.
DOS 5.0's DEVICEHIGH and LOADHIGH commands will use only the largest UMB
they can find and waste the other smaller ones.  Try to get the largest
contiguous block possible by moving the adapter's shared memory as well as
other hardware devices that may be occupying areas in upper memory and
group them together.

2.  If you do not need an expanded memory page frame, configure your memory
manager so it does not set one up for you.  This will automatically return
another 64 KB in addition to what you have already reclaimed.  By doing this,
a 386 machine should typically be able to return well over 150 KB of the
384 KB from the area between 640KB and 1 MB.  Note:  The amount of reclaimed
space varies from machine to machine.  Also, you can only reclaim space if
you do not have any hardware that is using up some of the UMB area.

3.  If you use one of the third party memory managers, use some of the
memory managers' features to reclaim more memory, such as the monochrome
video RAM on VGA adapters in the area between B000-B800.  Also, take
advantage of the memory managers' ability to load programs into non-contiguous
blocks, so that you can maximize the use of all memory blocks, not just
the largest one.  (By comparison, DOS 5's EMM386.EXE cannot selectively
choose non-contiguous memory blocks, so you are limited to the largest one
it can find.)

4.  When loading drivers high, use a utility that will tell you which blocks
of memory are available to be used and how much total memory is accessible
for drivers to load high into.  DOS 5's MEM/C command, used with EMM386.EXE,
is adequate but cumbersome.  However, programs in the third party memory
managers are recommended.  They provide utilities to scan upper memory and
tell what is available and how much of it the memory manager can reclaim.
This helps users to quickly determine how much room they have to work with.
Some programs include a maximizing utility that automatically does the
calculations on the device drivers and TSR sizes and tries to place them in
the UMB so that the block is used efficiently.

