wind@cellar.bae.bellcore.com (Wind Chen) (08/25/90)
I usually do NOT explain anything over network into such a detail as I am about to do here, especially when the subject tends to start a controversy which is not controvertible. The subject is "Expanded memory, LIM 3.2 v.s. LIM 4.0". Recently, someone quoted LIM 4.0 emulation from a book from the Waite Group without explaining (or knowing) the detail and someone blamed IBM confuses us with "extended-expanded- expansion". All these are sort of misleading. Let's get the second one out of the way first. IBM has memory expansion board which is the name of the printed circuit board for additional memory, it is the name of the hardware. One may name a product, hardware or software, expansion memory, but it should never be involved into our subject as a NEW memory type. Expanded memory has nothing to do with IBM either. Keep one thing in mind that when we discuss expanded memory, LIM is always part of it; no LIM specification, no expanded memory. Generally speaking, expanded memory is the name of the way we utilize memory, not a different kind of physical memory in our machine, I will get into the detail later. However, the "I" in "LIM" stand for Intel, not IBM. The term "extended memory", on the other hand, come with 80286 and 80386 computers, in which the memory above 1MB conventional address space CAN be used and discussed, to distinguish them from conventional memory. I won't give this credit to IBM, since 8088, 80286 and 80386 are Intel's product and IBM DOS is actually Microsoft DOS. There was an article posted here couple weeks ago which explains all three different kinds of memory fairly well, therefore I have no intention to do it again, however, for people who missed it, I will go over the basis so that I can make my point - "LIM 3.2 and LIM 4.0 are different and LIM 4.0 requires hardware support" in one shot. On the PC/XT: There is no extended memory on these machines. The 8088/8086 processors can only physically talk to 1MB. On the PC/AT (80286): The 80286 processor was designed to address 16MB. Unfortunately, it is constrained by the DOS limitation of 640K. This is why the use of extended memory is rather limited on 80286 machines. On the 80386: The 80386 can address up to 4GB (Gigabyte). We are still constrained by the DOS 640K limitation. However, extended memory is much more useful on 386 machines, due to the 386 processor's BUILT-IN ABILITIES (hardware) to EMULATE EXPANDED MEMORY and create virtual 8088 machines. +---------+ 16MB for 286 or 4GB for 386 | | . . | | +---------+1024K <---------------------------+ | |<------- 384K for BIOS etc. | +---------+640K | (8088/8086) | | +--- Conventional | |<------- Conventional memory | Address Space | | 640K DOS limitation | +---------+0K <---------------------------+ Note: If a machine has 1MB memory (RAM), it has 640K conventional memory (RAM), 384K ROM for BIOS and 384K extended memory. In some machines which equip high speed RAM, you can optionally copy BIOS to RAM, so that BIOS can run faster. Then you won't have any extended memory left in above case. EXTENDED MEMORY ALWAYS STARTS AT THE 1MB BOUNDARY. Since DOS is limited to 640K, 286 and 386 processors can only access the memory above 1MB in a special mode, called "protected mode". DOS runs in the standard mode, called "real mode", which acts just like an 8088/8086 with 1MB address space. So to be able to access the extended memory, it is necessary to SWITCH THE PROCESSOR TO PROTECT MODE, access the high address, then SWITCH BACK TO REAL MODE. There are TWO DIFFERENT KINDS OF EXPANDED MEMORY, differentiated by TWO DIFFERENT Lotus/Intel/Microsoft (LIM) expanded memory specifications. THE TWO ARE LIM 3.2 and LIM 4.0. LIM 3.2: Expanded memory was first used in the old PC and XT. (Surprised?) It is done through a technique called Bank Switching and IT IS WHAT EXPANDED MEMORY IS ALL ABOUT. In order to use expanded memory, you must load a device driver to tell the Expanded Memory Board how to communicate with the PC. The device uses an "empty" location in the upper address space (between 640K and 1M) which consists of four contiguous 16K "pages" of memory (64K in total) as the area where information is mapped into and from the RAM of the Expanded Memory Board. Information is NOT being physically copied from EMS card to the RAM of the computer. The device driver simply changes the card's page register (HARDWARE!!!) to make the pages in the page frame point to the data on the Expanded Memory Board. The LIM 3.2 standard is just fine for storing data such as spreadsheets in expanded memory, it does NOT help for MULTITASKING. This is why the LIM 4.0 standard was created. LIM 4.0: Before I start, remember, whichever LIM standard we are dealing with, the basic operating principle of Bank Switch is still at work. However, the page frame of LIM 4.0 no longer has to be 4 pages (64K), nor does it have to be contiguous. Page frame can be more than or less than four 16K pages and anyone of these individual 16K pages can be mapped anywhere desired. Now, remember the "page register" ? (HARDWARE!!!) Not all memory boards have the register support to supply more than the four 16K pages required for LIM 3.2. Even though a memory driver may conform to the LIM 4.0 specification, that does NOT mean the HARDWARE can provide a larger page frame. i.e. The original Intel Above Board does not provide LIM 4.0 support, but Above Board Plus does. With larger page frame, many application can be loaded at once, and Bank Switch allows us to "look at" them in turn, executing a few instructions then "banking" to the next - MULTITASKING. LIM 4.0 v.s. LIM 3.2: LIM 3.2 allows 64K of memory to be banked at a given time. Supports up to 8MB of expanded memory. LIM 4.0 allows up to 1MB to be banked at a given time - if the hardware (page register) supports it. Supports up to 32MB of expanded memory. LIM 4.0 is a SUPERSET of 3.2, meaning that all of 3.2's functions are supported by 4.0 - ASSUMING A 64K CONTIGUOUS PAGE FRAME IS AVAILABLE, if and only if. Because LIM 4.0 can have a smaller page frame than 3.2, and in that case you can get LIM 4.0 but not 3.2 functionality, therefore, LIM 4.0 should NOT be considered as so called "backward" compatible to LIM 3.2. It has backward compatibility, but only compatible when 64K contiguous page frame is presented. LIMULATORS: There are some programs available that emulate expanded memory using extended memory and/or hard disk space. These programs are sometimes known as "LIMULATORs". Since they are not HARDWARE, they must place page frames in conventional memory, as well as take some space for the driver itself (LIMULATORs generally take about 80K of conventional memory to run). Since the goal of LIM 4.0 is multitasking, and conventional memory is the most precious memory in your machine, therefore ....... 80386: Due to 386 processor's BUILT-IN abilities to emulate expanded memory, extended memory is usually the only memory you need for a 386 system. If LIM 4.0 is needed, some software products can convert it to LIM 4.0 without problem. i.e. QEMM/386, Window/386 and Window 3.0. However, if you install a LIM 4.0 EMS card on a 386 system, it will work, but you are wasting your money. Most of above information are from a Microsoft Application Notes, I hope these information are helpful.
scjones@thor.UUCP (Larry Jones) (08/25/90)
In article <26219@bellcore.bellcore.com>, wind@cellar.bae.bellcore.com (Wind Chen) writes: > [ an EXCELLENT monograph on extended, expanded, etc. memory but > perpetuating the confusion about: > "LIM 3.2 and LIM 4.0 are different and LIM 4.0 requires hardware support" For the last time (I hope): LIM 4.0 is a standard that was developed by a committee with lots of personal priorities. As such, it is a nearly useless compromise. What it says is basically, "If you want to offer these functions, here is how you should do it." It does not require any functions that would require any different hardware than LIM 3.2 did. It ALLOWS them, and gives a standard way to access them, but it does NOT REQUIRE them. Thus, "Does this board support LIM 4.0?" is almost NEVER the question you want to ask since the answer is basically meaningless. If you want to know "Does this board support multitasking?" or "Can DesqView use this board to do multitasking?" then those are the questions you should ask, not whether it supports LIM 4.0 or not. ---- Larry Jones UUCP: uunet!sdrc!thor!scjones SDRC scjones@thor.UUCP 2000 Eastman Dr. BIX: ltl Milford, OH 45150-2789 AT&T: (513) 576-2070 The living dead don't NEED to solve word problems. -- Calvin