NewDeal Technical Support Document 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.
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
DR-DOS 6.0 sample configuration files
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.
Before editing your CONFIG.SYS file, be sure you have a system diskette, sometimes called a boot disk. If you make a mistake while editing your CONFIG.SYS file, you may need the system diskette to get your computer started. Instructions for making a boot disk are provided below.
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.
To tell NewDeal 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. NewDeal will check for the types of memory available. Memory types that are not available to NewDeal 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 NewDeal 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 NewDeal.
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.
Expanded memory (EMS) provides faster swapping time (as NewDeal 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.
Some customers ask, "When I load EMM386 in my CONFIG.SYS file with the NOEMS switch, I can get as much as 624K free conventional memory. When I let Windows manage my memory, the best I can get is 590K. How can this be better?" The answer is: Windows can provide NewDeal with both EMS and XMS memory on demand (assuming the default configuration for the Memory tab in your shortcut's Properties). With EMS, NewDeal treats 48K of UMBs as if it was conventional memory. 590K plus 48K is more than 624K.
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.