DOS Days

Extended and Expanded Memory on the 286

The ability to make use of RAM above 640 KB was difficult in the days of the 80286 micro. We were still wrangling with LIM (Lotus-Intel-Microsoft) trying to standardise what Expanded Memory looked like and how best to 'page' it.

One of my 80286 mainboards uses the popular Headland Technologies HT12/A chipset, which has an XMS/EMS driver from Quadtel called HT12MM.SYS. If you have any other chipset, you can try EMM286.

To get Expanded Memory (EMS) on this system, you add a line to the very top of your CONFIG.SYS file, like this:


You may notice this reports a message that states 'No EMS memory is present':

If this occurs, the likely cause is that your BIOS is not configured to expose the memory to the operating system. Almost all HT12/A chipset PCs have an American Megatrends BIOS that supports hardware EMS (one known exception is the Schneider EuroPC 286, which uses a proprietary BIOS).

If yours is American Megatrends, go into your BIOS (typically by holding down <DEL> as the machine starts up) and look for an option called 'EMS Size Option':


Change this to the maximum size possible (or at the very least give it some capacity, such as 1024 KB or 2048 KB depending on your installed memory), save your BIOS settings and allow the system to reboot. When the HT12MM.SYS driver loads, it should now verify your memory instead of showing that error.

If you now check your memory configuration, e.g. by running mem /c you will notice all of your higher memory is now configured as EMS (Expanded Memory Specification):


Extended Memory (XMS)

What if I want XMS instead, I hear you ask? That's pretty simple too. The same driver, HT12MM.SYS, can be configured with a set of command-line arguments. One of these is /Extended=nnnn

Edit your CONFIG.SYS file again, and change the top line to now be:


Save it and reboot. Before allowing the system to reboot fully, go back into your BIOS setup and change that "EMS Size Option" again. Remember, this is the setting that the BIOS tells your operating system how much EMS you have. If you want to aportion any of this to be XMS, you need to reduce this number by that amount. For example, I want 1 MB of XMS and the rest to be EMS. So I reduce the "EMS Size Option" by 1024 KB, save and allow the system to restart. Now check your memory config again:

Here's mem /c again:

and here's Norton System Information 8.0's summary screen:

You can also then add DOS=HIGH to your CONFIG.SYS file in order to load a portion of the DOS kernel into high memory (above the 1 MB line). MS-DOS 6.22 usually takes up about 59 KB of conventional memory - by using DOS=HIGH, this is reduced to just 15 KB of conventional memory used.


Loading Drivers into Upper Memory

The area between 640 KB and 1 MB was originally reserved for use by ROM BIOS' by various 3rd-party manufacturers, but over time it became the standard place to install device drivers in order for them to not use up precious conventional memory (0 KB up to 640 KB).

On the 286, you need a separate memory device driver to configure this upper memory area (UMA) into what are called Upper Memory Blocks (UMBs). One of the most functional is called The Last Byte.

The Last Byte (TLB for short) came in several versions. The latest, v2.52a, has a buggy CHIPSET.EXE file, which is the chipset detection utility. With the Headland HT12/A chipset, it will lock-up when it detects it. INSTALL by default forces you to run CHIPSET.EXE to detect the correct chipset, but you can get around this by running it and telling it what chipset to use like this:


The only negative aspect of both v2.11a and v2.52a of TLB is that it's shareware not freeware, so you must pay for a licence to use it after 30 days, and there is a 30-second delay whenever you start your PC with it installed.

Also, I had some issues getting it to work properly. The INSTALL utility changed CONFIG.SYS to load HIMEM.SYS after loading the LASTBYTE.SYS - this caused HIMEM.SYS to always lock up after it began testing the memory. The LASTBYTE documentation is pretty thorough, and apparently if an XMS driver is already loaded it will latch onto it and make us of it, but if one is not already loaded it will load one to use. To remedy the lock-up, I adjusted the order of execution in CONFIG.SYS as follows (and used the default MS-DOS version of HIMEM.SYS):

Check out that free conventional memory: 623 KB!

Note that I also removed the FRAME:D000 from the end of the LASTBYTE.SYS line - this apparently is necessary to get UMBs working.