210
It's important to remember that "memory" means RAM memory, not free hard disk space. The amount of free space on your hard disk is not related to the amount of memory you have in your computer, or how much of that memory is available.
Every software program has "memory requirements" - a minimum amount of memory it needs to operate. Most software programs need as much of the base 640K of memory (also called conventional memory) as possible. When you boot your computer, memory is taken up by device drivers and TSRs-programs that load into memory from your AUTOEXEC.BAT and CONFIG.SYS files. The key to good memory management is twofold: first, load as few of these programs as possible; second, load as many of these programs as possible into "upper" memory - the memory above the base 640K and below 1 MB.
MS-DOS will give you a result similar to this:
655360 bytes total conventional memoryIn this case, MS-DOS reports that out of the 640K of conventional memory, 468,000 bytes (457 K) is free for use by your DOS programs.
655360 bytes available to MSDOS
468000 largest executable program size
1048576 bytes total contiguous extended memory
0 bytes available contiguous extended memory
983040 bytes available XMS memory
MS-DOS resident in High Memory Area
DR-DOS 6.0 will give you a result similar to this:
Memory Type Total Bytes (Kbytes) Available (Kbytes)In this case, DR-DOS reports that out of the 640K of conventional memory, 528K is free for use by your DOS programs.
Conventional 655,360 (640K) 541,424 (528K)
Extended 3,145,728 (3,072K) 3,145,728 (3,072K)
You can use virtually any memory manager. HIMEM.SYS and EMM386.EXE are provided with DOS, HIDOS.SYS and EMM386.SYS come with DR-DOS, but you can also use Quarterdeck's QEMM386.SYS or another commercial memory manager. Any of them will make the memory above 640K available for your TSRs and device drivers on a computer with a 386 or higher processor, and on some 286 computers. If your 286 computer cannot use upper memory, it can at least load DOS into high memory. Loading DOS, TSRs, and device drivers into upper or high memory frees up conventional memory.
How to make more Conventional Memory available
The simplest way to free up conventional memory is to use a program that automates the process. These programs will install the memory manager and insert commands into your AUTOEXEC.BAT and CONFIG.SYS files to load your programs above the base 640K. Some of them are MSDOS 6.x's Memmaker, Quarterdeck's QEMM386, and Qualitas' 386Max. Please be aware that the mention of these products in this document does not constitute an endorsement on the part of New Deal. A computer consultant or retailer will be able to advise you on the best program to suit your needs. Follow the instructions with the product you choose to free up your conventional memory.
If you elect to do the process yourself, you will need to use a text editor to edit your AUTOEXEC.BAT and CONFIG.SYS files. Add a line to CONFIG.SYS for your memory manager (following the instructions in your DOS manual), then add the appropriate commands to load drivers and TSRs into upper memory.
Here are some sample files from some typical systems (of course yours will look different):
MS-DOS sample configuration files
CONFIG.SYS
device=c:\dos\himem.sys
device=c:\dos\emm386.exe
dos=high,umb
files=30
buffers=30
AUTOEXEC.BAT
c:\dos\smartdrv.exe
lh c:\mouse\mouse
lh c:\mouse\mouse
prompt $p$g
DR-DOS 6.0 sample configuration files
CONFIG.SYS
device=c:\drdos\emm386.sys
hidos=on
hidevice=c:\drdos\ansi.sys
hibuffers=30
files=120
AUTOEXEC.BAT
prompt $p$g
path=c:\drdos;c:\newdeal
hiload c:\mouse\mouse
cd\newdeal
newdeal
Temporarily disabling some programs
You can't load programs into the memory above 1 MB - you can only load programs into conventional memory or into the memory between 640K and 1 MB. The upper memory area has only 384K of memory and some of it is used to control your computer's hardware, such as your monitor. Because there is a limited amount of space in the upper memory area, all of the programs loading in your CONFIG.SYS and AUTOEXEC.BAT file may not fit.
If you can't figure out how to use your memory manager, or if you still don't have much conventional memory available, you can temporarily disable some of your drivers and TSRs. To do this, use a text editor to edit your AUTOEXEC.BAT and CONFIG.SYS files. Put the command REM in front of any device driver you don't want or need. In other words, put REM at the beginning of the line that refers to the program you don't want to load. If you put REM in front of a line, then later realize you need to load that program after all, simply delete the REM, save the file, and reboot your computer. If you have compressed your hard drive, be careful not to put REM in front of any disk compression drivers such as Stacker, DblSpace, DoubleDisk, or SuperSTOR.
The last resort
One way to free up a lot of memory is to boot from a floppy disk. To accomplish this, simply put a blank disk in your A: drive and enter:
FORMAT A: /Sat any DOS prompt.
Then turn your machine off, wait 15 seconds and turn it back on again, leaving the newly formatted disk in the drive. Your machine may ask you for the time and date, and it will bring you to an A: prompt. You can then type C: to get to the hard drive where you can run your programs. None of the device drivers or TSRs in the CONFIG.SYS or AUTOEXEC.BAT files on your hard drive will be in memory.
New Deal software will use any available memory - both conventional memory and memory over 1 MB.
To tell New Deal you have extra memory, launch Preferences, click on Computer, and turn on the memory types that you have available. If in doubt, select all three options: Expanded (LIM/EMS), XMS/HIMEM.SYS, and Extended (over 1 MB). Click OK, then Yes when prompted that the system software needs to be restarted. New Deal will check for the types of memory available. Memory types that are not available to New Deal will become deselected again in Preferences, Computer. The Extended (over 1 MB) option will only be selected if you are not loading any memory managers at all.
If only one memory type stays selected, that probably means that all of your memory is configured as one type. For example, if HIMEM.SYS is the only memory manager you are using, the only Extra Memory Type that will stay selected is XMS/HIMEM.SYS.
Also, if you only have 1 MB total memory, and you have a lot of TSRs and other programs taking up memory, there may be no extra memory available by the time New Deal loads. If you are using DRDOS 6.0 and TaskMax, you may be using TaskMax options that dedicate blocks of memory for use by TaskMax and limit the amount of extra memory available to New Deal Office.
Managed Extended memory (XMS) vs. Expanded memory (LIM/EMS)
Managed Extended memory (XMS) is basically extended memory plus a memory manager like HIMEM.SYS. Expanded memory (LIM/EMS) is memory that is being managed by an expanded memory manager, usually a proprietary memory manager that came with your memory chips and board. With some memory managers, you can configure some memory as Expanded and some as XMS. As far as New Deal is concerned, there is no significant advantage to doing this, but your other DOS programs might benefit from it. See the manual for your particular memory manager for more information.
When you have a choice between setting up your computer to use either XMS or Expanded memory, you have to evaluate which would be best for your particular needs. Some DOS programs can only use Expanded memory; Windows is one of the few programs that works best with Extended memory.
What New Deal software prefers
When your primary concern is using the best memory for New Deal, XMS is generally best because it presents fewer compatibility problems. Some TSR programs will load themselves into upper memory without notifying the operating system that they are there, and if you're not using an XMS manager, New Deal can't tell that the TSR is there and might try to use the same memory. XMS is particularly nice if the XMS memory manager can provide New Deal with upper memory blocks - blocks that lie between 640K and 1 Mb - as New Deal can then use that memory, provided it isn't being taken up by TSRs and device drivers. An example is QEMM386 with its "RAM" option or EMM386.EXE with the "noems" option.
Expanded memory (EMS) provides faster swapping time (as NewDOS doesn't have to enter and leave protected mode to use it as swap space) and EMS provides an additional 48K of memory to the pool that applications can use directly. However, the speed difference between XMS and EMS is so small as to not be noticeable on most systems. Using XMS might allow more of your TSRs and device drivers to load into upper memory, which results in more free conventional memory--a Good Thing.
RAM Drives
Swapping to a RAM drive is less efficient than allowing New Deal to swap directly to free expanded or extended memory, but is still preferable to swapping to the hard drive. Obviously, when New Deal Office runs out of RAM, it will have to swap to the hard drive and this will slow down performance. To make sure New Deal is running as efficiently as possible, give it as much extended or expanded RAM as you can and avoid using RAM drives.
Handles
In the New Deal section of Preferences, there is a setting for the number of "handles" available to New Deal. A handle is basically a pointer to a place where New Deal has stored information. The number initially assigned (3500) should be enough and you should not need to change this setting.
Real, Protected, and Virtual Memory
A brief introduction to the history of processors and operating modes.
The original 8088 processor was designed to directly address only 640k. It can actually address more but the additional address space is reserved for system uses and is not available to software applications. The 8088 is also a single-threaded processor and can only handle one task at a time. It wasn't called anything at first because it was the only method available, but this mode of operation is now called REAL mode.
The 80286 processor was designed to operate in either of two different modes, REAL and PROTECTED. The REAL mode is downward compatible with the earlier 8088 and has all the same capabilities and limitations, including the 640k memory limit. But the 286 can also operate in PROTECTED mode. This uses a completely different set of circuitry in the chip and has several features not found in REAL mode. First, it is not limited to 640k as the chip can directly address 16meg of memory when in this mode. Due to built in support for virtual memory (page swapping), software applications can actually address up to one gigabyte of memory. In addition, the 286 provides direct hardware support for multi-tasking in this mode. It also provides memory protection (thus the name) which prevents a task running in one block of memory from invading the memory being used by another task. The downside of PROTECTED mode is that it is totally incompatible with applications written for REAL mode, including MS DOS itself. OS/2 is an example of an operating system that runs entirely in protected mode.
Finally, along came the 80386. The 386 retained both REAL and PROTECTED mode operation to be downward compatible with earlier processors, but added some new features. First of all, the enlarged 32 bit address bus allows the chip to directly address a whopping four gigabytes of memory with virtual memory addressing of 64,000 gigabytes! Another feature of the 386 chip is the addition of VIRTUAL REAL mode. This mode utilizes the virtual memory mapping features of the chip which allows it to slice up the PC's memory into separate partitions, each of which then appears to be its own little PC (a virtual machine) operating in REAL mode. This allows downward compatibility with REAL mode applications while retaining the ability to multi-task at the hardware level. When Microsoft Windows says it is running in "Enhanced" mode and multi-tasking DOS apps, it is really the 386 chip that is doing the work via this VIRTUAL REAL processing mode. This is why Windows Enhanced mode requires a 386 machine to operate.
XMS has three types of memory to offer an application: upper, high and extended.
Upper memory lives between 640K and 1 MB and is usually provided only with the help of a 386 (QEMM, 386MAX with the RAM option) or a special chip set or an EMS board. If an XMS manager supports upper memory blocks, our software will allocate as many as are available (up to 10) and give it to the heap to parcel out to applications just as if the blocks were part of the conventional 640K--the applications never know the difference.
High memory is the 64K-16 bytes that can be accessed at the 1 MB boundary on a 286 and above, owing to a quirk of the address calculation. If this is available when our software starts up, it will use this memory, but only for swapping as DOS can't access memory up here (it "normalizes" all pointers it's given, so any pointer to this area gets wrapped down to the interrupt table at the bottom of memory). Our software can swap to this 63K faster than it can to the rest of extended memory, as it doesn't have to go to and from protected mode to do it.
Extended memory is anything beyond the first 63K. Our software will use the largest free block of extended memory the XMS manager has to offer and will swap to it using XMS functions. This is, of course, a little slow, but not as slow as swapping to disk.
When in the presence of EMS (expanded memory), our software takes the 64K page frame provided by a 3.0-compliant EMS manager and maps 3 16K pages to the lower 48K and gives it to the system in the same way as upper memory is used -- those 48K are parceled out automatically among the applications as requested and they never know the difference. The remaining 16K page is used for swapping, with data being copied to the 16K page until no more will fit, at which point the current EMS page that is mapped there is mapped out and another EMS page from the set the software allocated at start-up is mapped in its place, and the swapping continues. The software doesn't use the expanded page frame offered by some EMS 4.0-compliant managers and boards.
Given a choice between having memory be expanded and extended, I would always choose expanded, both for the extra 48K it provides for immediate use by applications (it's amazing the difference 48K makes in system performance), and for the increased speed of swapping (not having to go in and out of protected mode to copy the data), as well as the lessened chance of losing serial port interrupts while in protected mode.
If presented with just raw extended memory, no XMS driver, the software just uses the whole thing as swap space, employing the BIOS block move function to copy the data to and fro.
Entire books have been written on memory management. We have tried to give you some essentials in this document. If you need more information, check your DOS manual for a section on memory management or optimization, or consider using a program like Quarterdeck's QEMM, Qualitas' 386Max, or Microsoft's Memmaker, which handle the configuration for you.