Extended memory specification

from Wikipedia, the free encyclopedia

The Extended Memory Specification (XMS for short) is a standard that specifies how programs under the MS-DOS (and compatible) operating system access the main memory beyond the 1 megabyte limit (so-called extended memory , also known as " extended memory ." “Translated) can access.

development

The MS-DOS operating system was intended for real mode , an operating mode of the x86 -compatible microprocessors in which the main memory is accessed as with the 8086 processor. In this operating mode, only the first mebibyte of the main memory can be addressed. From the 80386 onwards , this limitation can be circumvented in Unreal mode .

When the first PC-ATs were delivered by IBM , they were equipped with the 80286 processor, which could address more main memory. Over time, PCs came on the market that were equipped with more than 1 MiB main memory. In the meantime, the 640 KB that could be used for application programs under DOS had already become too small for many purposes. However, access to the extended memory was difficult because the processor had to be switched to protected mode . The BIOS offered a function (via the software interrupt 15 hex ) with which memory areas could be copied to the extended memory, but handling it was laborious and risky. There was also no access control if several programs wanted to access the memory.

Was therefore in 1988 by the company Lotus Development Corp. , Intel Corp., Microsoft Corp. and AST Research Inc. developed a specification that should control access to the extended memory.

XMS 3.0 "Super Extended Memory"

The XMS functions defined in XMS versions 1 and 2 used 16-bit values ​​to specify block sizes (in kilobytes), which was sufficient to address a maximum of 64 MiB.
In 1991 the XMS 3.0 was published, which made access to more than 64 MiB main memory possible. This was also called Super Extended Memory . The functions used 32-bit registers, which were only available from the 386 processor onwards, but this is not a problem, since on 286 processors generally only a maximum of 16 MiB main memory could be addressed.

Access procedure

A special driver , the extended memory manager (XMM), is responsible for accessing the extended memory according to XMS . Using this, application programs, but also other device drivers, can reserve memory areas in the extended memory, copy data from conventional memory into it and later back again, and release the memory again after use. This driver is called under MS-DOS HIMEM.SYSand must be loaded when the computer starts up. Under other MS-DOS-compatible operating systems, this driver is sometimes called differently and is sometimes linked to an expanded memory manager (such as EMM386.EXE) that provides EMS .

The entry point for the service routine of the XMM, via which the XMM offers its services, can be determined via the software interrupt 2F hex .

The access to memory areas in the XMS takes place via so-called handles , which the XMM returns when a memory block is allocated. To copy blocks of memory between the XMS and conventional memory , the special XMS handle 0000 16 is used to specify memory addresses in conventional memory. The XMS handles were a scarce resource because the XMM had to hold administrative data for each handle. 32 handles were common, the number could be increased to 256 depending on the XM.

Problems

Since you have to temporarily switch to Protected Mode to copy data between the DOS memory and the extended memory, access to this memory is comparatively slow. Especially on 80286 CPUs, as these require a processor reset to switch back to real mode , which also takes a long time. In principle, copying data back and forth between different storage areas noticeably slows down XMS.

As of the I386 , the expanded memory can alternatively be used to provide so-called expanded memory (EMS, see: Expanded Memory Specification ). Because EMS memory is programmatically easier to use than XMS memory, DOS programs that used EMS memories were more common. However, many memory-hungry programs (e.g. games) could handle both memory expansions.

See also

swell

  1. http://www.phatcode.net/res/219/files/xms30.txt
  2. http://www.i8086.de/dos-befehle/himem-sys.html