From: apple@drvax3.msfc.nasa.gov (Kathleen Applegate)
Subject: Troubles w/QEMM386's OPTIMIZE?  Then read this.
Summary: A Procedure outlined on using QEMM386's OPTIMIZE utility.
Keywords: QEMM386, optimize
Organization: NASA/MSFC
Date: 21 Jul 92 13:51:50 GMT


QEMM386's auto-memory-configuration utility, Optimize, has a
problem with several different parts of PathWorks,
particularly earlier versions of PROTMAN.DOS, a device driver
used with NDIS.

It happens that the Optimize utility is one of the key
arguments we used at this site to justify QEMM386's purchase--
automating system tweaking and saving hours of (expensive)
staff time.  But when the procurement cycle finally spit the
baby out, Optimize wouldn't run!  Bombed with an Exception
13 error that nothing we tried could get past.

The procedure outlined in this posting is based on
Quarterdeck's Technical Notes #220 and #227.  Quarterdeck
(310-392-9701) will be happy to FAX them to you, or you can
download them from their BBS (310-314-3227).  They also have
an internet address from which, I'm told, you can obtain
tech notes:  support@qdeck.com

Can you use QEMM386 without the information in those
tech notes?  Yes.  Manually.  Can you use QEMM386's Optimize
utility absent the tech notes?  Negative.

Most of the "special handling" below has to do with using
versions of PROTMAN.DOS 2.0C or earlier.  If you are using a
later version of PROTMAN.DOS, or if you're using DEC's
native datalink driver, then only a portion of the following
applies.

The following steps assume this configuration:  NDIS driver,
DEC DE-200 nics w/64K buffer enabled and using d000-dfff,
DOS 5.0., QEMM386 6.0 with the Stealth feature enabled,
PROTMAN.DOS 2.0C CSD rev 8 or earlier.  It also assumes
you've already installed QEMM386.

1.  Edit your CONFIG.SYS and load DOS=HIGH, but don't use
    the DOS=HIGH,UMB variant of the command.  Let QEMM386 do
    the UMB management.

2.  Don't load either of the DOS 5.0 memory management
    drivers, EMM386.EXE or HIMEM.SYS. 

3.  Take a look at how you are loading QEMM386.SYS--don't
    try to get too fancy here.  You might want to start with
    a basic configuration whose values and loading order you
    are sure of.  Note that QEMM386 will process the
    parameters sequentially.  Certain combinations will
    behave differently according to the order in which they
    are loaded.  Go into this with the idea that tweaking is
    an iterative process, so start with something with which
    you are comfortable.

    These were my starting-point parameters:

    DEVICE=C:\QEMM\QEMM386.SYS RAM x=d000-dfff st:m xst=dc00

    a.   Excludes QEMM from using the area of memory used by
         the DE-200.
    b.   Invokes Stealth using the (m)apping method instead
         of the (f)rame method.
    c.   Excludes Stealth from using the chunk of the d000-
         dfff address space that is used by the DE-200 ROM--
         the remainder of that space is a RAM buffer.

4.  Run NETSETUP and tell it you won't be using XMS or EMS. 
    Load all PathWorks components into conventional memory,
    including the Redirector.  Make sure DNNETHLD is not
    being used to load DNNETHAT.  This lets QEMM386 have a
    free hand at juggling your memory, and will avoid some
    memory conflicts that DNNETHLD and EMSLOAD will cause.
5.  Reboot.
6.  In the file, C:\DECNET\EXECINFO.BAT, rem out the last
    line which should read:   \decnet\startnet.bat RUN
    If you don't do this, Optimize will do an infinite loop. 
    Make sure you un-REM it when you're ready to use your
    system.
7.  If you're using QEMM386 6.02, you can skip this step. 
    If you're using version 6.0 and if your startnet.bat is
    large, you will need to eliminate the REM statements and
    anything else that's not necessary (like the ECHO
    statements for on-screen info).  Reason is that 6.0's
    Optimize 9K buffer space allotted for CALLed .BAT files
    causes it to truncate the file.  Version 6.02 has been
    modified for a 20K buffer space.  After Optimize does
    its thing, put all this stuff back in if you desire.
8.  Make sure your AUTOEXEC.BAT will CALL your STARTNET.BAT. 
    Optimize will optimize secondary .BAT files only if they
    are CALLed.
9.  Make backup copies of any of the CALLed files you are
    expecting to optimize.  The utility does backup your
    autoexec.bat and config.sys, but not any of the CALLed
    files.
10. Run Manifest to verify that you have a chunk of upper
    memory at least 33K in size.  If you don't, then STOP
    HERE and refer to the Quarterdeck Technical Note #227.
11. Unload any programs that use Upper Memory Blocks
    (UMB's).  They can throw off the calcuations that
    Optimize will perform.
12. Run Optimize.  You will do two non-standard things in
    the process:
    a.   At the Optimize screen, "DETECTION PHASE", press
         ESC and then F1.  This breaks you out of Optimize
         at the point where it has begun its initial re-
         writing of your initialization files.

         Now, manually edit this "under-construction"
         CONFIG.SYS.  You will change only one line, the one
         loading PROTMAN.SYS.  Eliminate the /GS and /LABEL
         parameters.  This line will now look like this:

    DEVICE=C:\QEMM\LOADHI.SYS C:\LANMAN\PROTMAN.DOS /I:C:\DECNET

    b.   Optimize reports a wrong value for DNNETH's Initial
         Size, something like 128000 when it should be
         35000.  After Optimize has taken its initial
         reading of your system, access the Options menu,
         and then press "2" to make changes.  The tech note
         suggested a value of 35000 (35K).  But since my
         Final Size value was 36048, I entered 40000 for
         this value and encountered no problems.

13. Reboot and Optimize will continue its work.
14. Remove the REM you added in step 6.
15. See the manual on QEMM.COM w/Analysis modifier for more
    advanced optimizing.  You also might want to change the
    parameters used to load QEMM386.SYS and run through it again.
--
Kathleen Applegate                     |  New Technology Inc.
Senior Analyst                         |  700 Boulevard South, #401
apple@drvax3.msfc.nasa.gov             |  Huntsville, AL  35802