ID:ET Extended Memory and DESQview Quarterdeck Technical Note #106 by Dan Sallitt Extended memory is memory with addresses higher than 1024K (1 megabyte). Extended memory can only exist on machines with address buses capable of accessing more than 1024K, and requires a 286 processor or higher; the AT was the first machine that supported extended memory. DOS can only access the first 1024K of any machine's address space, and therefore cannot access extended memory directly; programs that access extended memory generally must go into protected mode to do so. Real-mode programs that use extended memory, such as VDISK.SYS, do not run their code above 1024K; they go into protected mode long enough to store data in extended memory, then return to real mode. Extended memory should not be confused with expanded memory, which does not occupy specific memory addresses and which is associated with special mapping hardware that allows it to appear as if it is located below 1024K. DESQview cannot run conventional, real-mode DOS programs in extended memory (unless the extended memory is converted into expanded memory, a process that is easily accomplished on a 386 machine with the help of Quarterdeck's QEMM-386). We can only accomplish the difficult feat of multitasking beyond 640K with the aid of the hardware mapping capabilities that expanded memory can provide. Extended memory, by contrast, is not intelligent memory: it simply sits above 1024K. In 1986 Quarterdeck discovered a loophole in DOS that allows programs to access the first 64K of extended memory without going into protected mode. DESQview 2.00 and later versions come with a driver, QEXT.SYS, which, when placed in the CONFIG.SYS file and used in conjunction with our XDV.COM or DV.COM loaders, allows DESQview to take 63K of its code out of conventional memory and place it in extended memory between 1024K and 1088K. QEXT.SYS is usually only needed on 286 systems, as QEMM-386 is capable of accomplishing the same task on 386 systems. In 1988 Microsoft, using the same loophole discovered earlier by Quarterdeck, announced the existence of the Extended Memory Specification (XMS), which governs DOS-based access to the first 64K of extended memory as well as protected-mode access to the rest of extended memory and access to blocks of memory between 640K and 1024K. The XMS has become a standard for extended memory allocation, and DESQview 2.26 and later versions support running programs that allocate memory through the XMS inside DESQview windows. In addition, the copy of QEXT.SYS that comes with DESQview 2.26 and later versions functions as an XMS manager, and can, if desired, give other programs access to the first 64K of extended memory instead of DESQview. (Only one program at a time can use this 64K block.) QEXT.SYS performs the same XMS functions as Microsoft's XMS manager HIMEM.SYS, and should be used instead of, not in addition to, HIMEM.SYS. Though DESQview cannot run conventional, real-mode DOS programs in extended memory, it can swap DOS programs back and forth from extended memory -- if the extended memory is used as a RAM disk and if the drive letter of the RAM disk is entered in the SWAP field of the DESQview Setup in the Logical Drives section. Programs that are swapped out are not running, but swapping programs back and forth to extended memory (which occurs automatically under the above circumstances when DESQview runs out of multitasking memory) is much faster than swapping to the hard disk. It has become increasingly common for large programs to take advantage of protected mode to run in extended memory, using supplementary utilities called DOS Extenders to handle transitions between protected mode and real mode. To make it possible for DOS Extenders to coexist with 386 memory managers, Quarterdeck and Phar Lap (a leading manufacturer of DOS Extenders) collaborated in 1988 to create the VCPI (Virtual Control Program Interface) specification. Many other vendors, including all major manufacturers of DOS Extenders, now support the VCPI. DESQview users who also have QEMM-386 (version 4.1 or later) can run VCPI protected mode programs in DESQview windows alongside DOS-based programs, without the need to reserve separate sections of extended and expanded memory for the different programs. The VCPI is a specification for 386 and 486 processors only. DESQview 2.26 and later versions can run multiple protected mode programs on 286 systems if the protected mode programs use XMS services to access extended memory. However, it is impossible on 286 systems to convert extended and expanded memory back and forth on demand, as can be done on a 386 system or higher; the 286 systems must be configured with enough extended memory to run the DOS Extender programs and enough expanded memory to satisfy DESQview's needs and the needs of other programs that use expanded memory. Microsoft Windows 3.0, which can go into protected mode and run Windows-based applications in extended memory on a 286 system or higher, is an example of a DOS Extender-type program that is not a client of the VCPI. However, special adjustments were made to DESQview 2.3 and QEMM 5.1 to allow Windows 3.0 to run in its standard mode (which uses the processor's protected mode) inside a DESQview window alongside other applications. Copyright (C) 1991 by Quarterdeck Office Systems * * * E N D O F F I L E * * *