You may be able to hear or read expanded memory, EMS, Extended Memory, XMS, EMM, UMB, HMA, VCPI, and DPMI. In order to explain how the programs are assigned to access 1MB of memory, this article will define these terms, so you are familiar with them when these concepts are associated with each other. As we have known, the architecture of the PC is based on the 1024K (1MB) memory space that can be used. For DOS, 1MB is all available for use, but for the use of the real world, 1MB memory is proved to be too small; users want to have a relatively large document and large electronic data sheets and databases, and Programmers write stronger programs require a larger executable (running the programs). To respond to the popularity of the PC and the needs of users' continuous changes, programmers and hardware diusters strive to explore ways to provide more memory and use these memory. In fact, more memory is not too big: just insert more chip or memory cards. It is a real challenge to make additional memory can be used. Obviously, more memory space is required, so the computer industry has developed many standards that use 1MB memory. Expanded Memory These standards are the expanded memory. Expansion memory refers to an additional memory of 1MB, which can be accessed (and in some cases by hardware access), the latter uses the expansion memory specification (explained later in this article). The expansion is not correct in memory other than a sorting boundary (such as 640K or 1024K) because the expansion memory is not a real location until it is mapped. This is why we call the expansion memory as "in other somewhere". Expansion memory can be used on any model IBM PC compatible computer: 8088, 8086, 80286, i386, i486, and higher models. It is invented on any PC used in 1985 and subsequent computers. While 286 and later processors have protection mode, they can use extended memory (discussed later in this chapter), but using the first standard in which more memory than 1MB, the first standard invention is used to start from 8088, To serve as big as possible in the future. On 386 and later, the memory management program necessary to use additional memory has been set to the processor chip (CPU). Special expansion memory hardware (usually a memory expansion board) is required on the computer 286 and below to provide expansion memory. The Expansion Memory Specification (EMS) is to use expansion memory, and the procedures must comply with the expansion of the internal cloth specification (EMS) - the rules that regulate access to the expansion. In 1985, Lotus developed EMS to enable the program to access more memory. Intel is added by manufacturing an expanded memory board. Shortly after the EMS was published. Microsoft requests some modifications to the norms and requests to join the alliance. So we have the door LIM / EMS - Lotus, Intel, Microsoft / Expansion Memory specification. However, all expansion memory issues are more suitable for called EMS. How does EMS work EMS work in indirect. The EMS is that the DOS believes that the data somewhere in memory is actually stored in a lower 640K. EMS realligates a memory address to another memory address. These blocks can be up to 1MB to provide the program itself can run in the expansion of the memory. This means that the program can be larger. And larger procedures can do more work faster. Why EMS must reordb the memory? Because DOS can only see the application and their data below 640k. It is invisible to memory DOS other than any 1024K. The expansion memory is displayed on a piece of memory at other somewhere, as if it is an address below 1024K, regardless of where it is actually located. This address represents the address of another memory block called a mapping. The expansion of the memory tablets via the combination of hardware and software will be pretended to be conventional memory.
DOS is not smart, so the program can use more memory than before by accessing the memory fragment called the page. In order to make the expansion memory into use, do three things together. 1. Follow the EMS written program; such a program is usually running more and can access more data more than programs that can only be run in conventional memory. 2, install the memory management hardware on this computer. No matter how type of computer you have, you need to install more than 1MB of actual memory (chip or card). The correct type of memory management hardware on the 286 or lower computer is the expansion memory card (not extended memory card - extended memory and expansion memory is different). The correct type of memory hardware on a 366 or better computer is the processor chip itself (these hardware is included in the processor chip). 3, an EMM (Extension Memory Manager): An EMM is a program that controls additional memory supported by the expansion memory specification. The EMM is explaining all memory calls and oriented them to ensure that all programs, devices, and other memory references they need to get what they want when they need, and have no conflict traffic police. Examples of EMM are EMM386 (with D055 and D056), QEMM and 386MAX. Extended Memory extension memory is 1MB of memory on a 286 or higher computer. Interview with the expansion memory ratio of access to the expansion, because the processor chip on the 286 and higher file is designed to "know" about installing additional memory. Extended memory cannot be used at a computer below 286 because its processor is not designed. Unfortunately, DOS does not know how to complete the simplicity of accessing the expansion memory. Unlike expansion memory (it can be used in real mode), the extended memory can only be used to use it. Using the extension memory in DOS needs to place the processor in a special mode to use extended memory and return to another mode to talk to DOS. Real mode and protection mode - Taiwan PC can have several operating modes. An 8086 has an operating mode: real mode. A 286 has two modes: real mode and protection mode. One I386 has four modes: real mode, protection mode, virtual 8086 mode and flat 32-bit mode. Each mode allows different access to memory and other functions. Each mode can access a completely different processor model. Depending on the better memory management and newer programs provided by the processor. To run old and new existing programs, there are various processor models in this chip to use. Your software places the computer in the necessary mode to supply the software you want. This is usually used to do this with a DOS expander. A DOS extension is a special program set in a DOS extension. When the program wants to use D0s, for example, when writing a file, it will perform "DOS Call". The DOS expander monitors these DOS calls and ensures that the program exchanges the processor to real mode when the DOS call occurs. The DOS expander allows D0s to do its work and then switch the processor back to the protection mode so that the program can continue. Real mode is the most compatible in three operating modes of 286, 386, i486 or Pentium computers. In the real mode, the 386 processor appears to restore the 8086 processor. Real mode is a mode that can be run on any 80x86 computer any D0S program. A DOS extension must switch from the protection mode to the real mode to access any DOS service (if you save a file). In real mode, the program cannot access any advanced features of a 386 computer, such as advanced memory management and protection. The protection mode protection mode is a mode that the DOS extension can run in it and store its data in extended memory. A DOS extension is a program that not only stores data in extended memory, but also runs its own code in extended memory. In order to do this, the DOS extension must be in the protection mode. In protection mode, the program accesses the 386 processor chip's memory management unit and uses the 32-bit register and addressing mode of the processor. Protection mode and use its DOS extension drastically increase the use of memory on the PC, making it possible to use a larger and faster program that can use unprecedented more data. Extended Memory Specification: A new specification called Extended Memory Specification (XMS) is developed to manage expansion memory.
XMS offers access to 640K to 4 gigabyte memory. To do this, you need to have an XMS driver on your computer, which is a strict XMS driver, such as Himem.sys, Microsoft, or one except for other memory management functions (EMM, high RAM access, etc.) XMS management programs, QEMM, QEMM.386, and other third-party memory management programs such as QuarabierDeck, for those programs that still want to use expansion memory into expand memory. Therefore, whether your software uses EMS or XMS, memory allocation is transparent, which means that there is no need to tell memory hardware, some memory is assigned to be EMS, and another part is assigned to XMS. There are several ways to access extension memory. The memory address can be written by reading from the top of the memory or from memory. One of the first batch of programs using extended memory is VDISK. It uses the allocation method from the bottom to the top. Other programs also use this method to access extended memory, Qext is a program. A program can selectively use an XMS driver to make memory allocation, then get its memory through the XMS driver. This is the most common and most desirable way to use extended memory, because if the program uses the industry standard means using memory, it can coexist with other programs that use the same standard. Using the XMS driver, the memory manager (opposite to the program) will receive the memory, and a small amount of memory is called the XMS driver, XMS requires DOS 3.0 or higher. When the A20 is selected, the computer may display a message such as "A20 line start". XMS uses the A20 line to use 1024K above memory. The A20 line is a combination of hardware and processor chips on the motherboard. The A20 line is a 21st address line of 80x86CPU, which allows access to memory of more than 1024K. If the A 20 line is selected, the processor can see 1MB of memory. If the A20 line is not allowed, any reference to one memory address of 1MB is folded back to the initial place of memory. This mechanism is called A20 "Try" because it determines whether the address lines 20, 21, 22, and 23 (until 31 on the 386PC) are allowed to be visible (selected). Using A20 lines, XMS can also use more newly created 64K regular memory than it in other situations. The high internal memory area (HMA) high memory area (HMA) is the first 64K of the extended memory. It is almost 64K. Memory terms are full of exceptions. The HMA is actually 64K minus L6 bytes because HMA begins with 16 bytes of the top memory (UMBS). This HMA is unique. Because in real mode, the code in it can be executed. This is because it can be snapped by a 16-byte address space existing below LMB. Our reason for this L6 byte is to be used to write programs that can be operated in this HMA can take advantage of this flash. Although most programs do not have a major modification, an example of using HMA can be used in DOS = HIGH Xms 5 and DOS 6, DesqView, DR DOS, and Novell's XMSNet. HMA is one of the small mouth of the DOS memory area that can be used to increase the number of memory available below 640K. The upper memory block (UMBS) and extended memory block (EMBS) all memory specification discussed in this article are set to get access to more memory. Although the larger region above 1MB has been opened, the memory below 640K is most useful, because DOS can understand everything there is, work, DOS's device driver requires very little 640K below Memory. But using EMS procedures and standard (non-extended) DOS programs are specifically running below 640K. To obtain more memory resources in this area, XMS provides a method of memory using memory between 640K and 1024K instead of 640K or less. It is done by creating UMBS that is loaded with the device driver there.
UMBS is based on 80x86-based computers, the upper memory block (UMBS) between 640K and 1MB address boundaries is a memory block available for DOS. The number, capacity and position of these blocks varies greatly with the type of hardware adapter card mounted in the machine. UMBS can be used to store programs, codes, and data that must usually be 640K or less. Sometimes it is called "putting the device driver to high end". The EMBS Extended Memory block (EMBS) is an extended memory located on the HMA, which can only be used to store data or DOS extensions. Virtual Control Program Interface VCPI) and DOS Protection Mode Interface (DPMI) other extended memory formats make Multi-task implementation of the DOS extension easier. Multitasking DOS Extension requires a Virtual Control Program Interface (VCPI) or DOS Protection Mode Interface (DPMI) because both the multi-task environment and the DOS extension running in this multi-task environment use extension memory. VCPI and DPMI are for each program how to use extended memory without conflicting with other programs. VCPI VCPI is a protected mode specification developed in 1987, which is an ultra-collection of EMS 4.0 specification. VCPI is created to avoid conflicts between these programs by allowing programs that need to extend memory. There is no way before XMS to make a program make sure that any memory it is not used by another program. In addition, VCPI manages memory allocation and switches between real mode and protection mode. VCPI allows programs that are run in protection mode to coexist with 386 memory management programs and programs running in other protection mode. VCPI is not working on the 286 machine because it is not supported by 286 hardware. VCPI (by a program) is supported by the VCPI Server (Server), which is usually included in the expansion memory management program. A service program is a program like a restaurant staff. It accepts orders from customers (a program proposed to memory requests), which gives a specific memory to the program. If a program is called, but no VCPI service is running, then the program takes over the computer hardware and manages its own memory. The program can directly get the memory it want, but there is no memory management program to prevent conflicts, so there is no other program to use the extended memory. DPMI is a protected mode interface updated near (1990). The difference between VCPI and DPMi is mainly DPMI to do its work without allowing the application to access the lowest level of the CPU. VCPI allows any program to access the lowest level of the CPU, which means that there is no other program (including the operating system) to confine the VCPI. This is a disadvantage because the operating system's designers do not want to interfere with each other. And I hope that only the operating system should be able to see other programs. DPMI also manages more than one entity that requires protection mode, such as a plurality of protection mode programs that are in progress. In addition, DPMI includes a newer programming interface for DOS and BI0S calls that can be performed by the protection mode program. Unlike VCPI, DPMI can be implemented on 286 machines and can span multiple operating systems such as OS / 2 and UNIX and DOS. To be later compatible, a program for requesting a DPMI service if the DPMI service is not found when these calls are found, can help to the VCPI service program (if VCPI can be used). Note: The exception to this definition is an expansion memory card. The expansion memory card is now abandoned. On the current compilation Teaching book, after the real mode compilation, it will begin to explain the compilation of the protection mode. And the protection mode assembly is started to speak flattening memory mode, segment memory management, paging memory management, etc. Many people are difficult to understand. The problem is that the inevitable connection between the real mode and the protection mode is cut.
Through this explanation, you can clearly get the development main line: real mode (small memory usage, single task) ----> Customer demand, hardware progress ----> Protection mode (large memory usage, multitasking ) ----> Early stage (VCPI, no process protection) ----> Development phase (DPMI, protected measures) ----> The interrelationship between today's protective mode mode. The protection mode begins with 80286 for 80286, Intel decides to give this 286 at a 24-bit address bus and a maximum 16 megabyte RAM at 166. However, the 24-bit address is calculated in the 16-bit CPU is not as easy as the value of 16, and the juiceters want to add additional capabilities to the addressing function. The fact that the CPU must operate in a completely different way known as the protection mode. Protection mode not only provides the ability to protect memory content not only at multiple programs, but also provides more memory addresses. It uses more complex methods of calculating the actual memory address. The benefit of the CPU runs in the protection mode is when several programs share the memory together, each program can be guaranteed to interfere with any other program. on the other hand. 8088 and 8086 run in real mode it does not have any memory protection. Any program can access any memory area between 0k and 1024K. Because both 8088 and 8086 are only available for one megabyte memory available, there are several programs that seem to be far away (unlikely) for those CPU designers, so memory protection is not an important function. In order to obtain a sign of 24 values. The radius is at 256 without taking 16 registers. It seems natural. This makes the two registers only overlap 8 to form 24 bits. However, this is not an 80286 working method, and the inclination mode requires more information to calculate the actual address. It also requires some protection information. The method actually used by the protection mode is to let part of the segment register represent a table in the memory, which describes how this segment is established. This table of items in each of the items in the memory is automatically referred to by the CPU. The table contains access rights (read, write, or only execution), the size of the segment, information about whether or not the memory actually exists, and other issues. The result is still 24-bit actual address, but the calculation is more complicated. 80386 - The epoch-processor 80386 has more functions and powerful. The chip has 32-bit registers, 32-bit data bus and 32-bit address. What does this mean? It means that 386 can access unusual 4G RAM. That is the four thousand megabytes of memory! But accessed more memory, just start. All additional modes of operation are removed from this flash addressing capacity. 386 Not only supports 8026's real models and 80285 protection, but it is now working in its own 32-bit protection mode (distinguishable 286 16-bit protection mode) and virtual 8086 mode. 32-bit protection mode (also known as a flat model (Float Model) allows the CPU as a complete 32-bit address with a 16-value segment value and 16-bit offset. In reality, the 32-bit flat model uses a description similar to the 80286 protection mode to provide similar protection functions. Even so, 16 is the fact that the actual physical address is effectively described as segments and 16-bit offset, making it easy in this mode. This mode also allows the CPU to use the space on the hard disk as memory when the computer does not have enough physical RAM. This "virtual memory" allows programs to focus on completing their tasks without having to care about the number of physical memory in the computer. Particular information tracking physical memory in the descriptor table. When calculating a memory reference, the descriptor is checked to find memory. If this is not this, the disk is used to obtain the correct memory map and put it in the actual memory, so the program continues to run. When performing correctly, virtual memory is only slightly slower than the actual memory, which has access to the actual physical memory of the actual physical memory that is much larger than the computer, allowing a larger, stronger program.