Understanding DOS Memory
When the DOS operating system was first designed, the PC hardware system only supported a 1 MB addressing space, so DOS could manage at most 1 MB of continuous memory space. Within this 1 MB of memory, only 640K was reserved for application programs; it was called conventional memory or base memory. The other 384K was called upper memory, reserved for video display, BIOS, and so on. In 1982, 640K of memory seemed more than enough for microcomputers; people even believed that 640K of memory could be used to do anything. It looks a bit laughable now, but at the time, that really was the situation.
The situation now is that even if your computer has several megabytes or several dozen megabytes of memory installed, if you use the DOS operating system, then you still only have 640K of memory that can be used directly. Memory above 1 MB can only be used through some memory management tools. Fortunately, Windows
95 no longer has the conventional memory limitation; all of your memory, whether 8M or 128M, can be used directly.
Under DOS, the following four kinds of memory exist in the system:
Conventional Memory;
Upper Memory;
Expanded Memory;
Extended Memory.
Conventional memory refers to the 0–640K memory area. Under DOS, ordinary application programs can only use the system’s conventional memory, and therefore are all subject to the 640KB memory limit. Also, because DOS itself, the device drivers installed in the config.sys file, and the memory-resident programs executed in the autoexec.bat file all occupy some conventional memory, the conventional memory available to application programs is less than 640K. Very often, we have to think of every possible way to tidy up memory so as to leave enough conventional memory for some applications with relatively big “appetites”; this is surely something many computer enthusiasts from the DOS era are all too familiar with.
Upper memory refers to the 384K of memory located above conventional memory. Programs generally cannot use this memory area, but EMM386.exe can activate part of upper memory, and it allows users to load certain device drivers and user programs into upper memory with Devicehigh or LH (i.e. loadhigh). dos=high,umb also loads part of DOS into upper memory. Here umb is the abbreviation of Upper
Memory Block.
Expanded memory is an early standard for increasing memory, and can be expanded up to 32M. To use expanded memory, a special expanded memory board must be installed in the computer, and a management program for managing the expanded memory board must also be installed. Since expanded memory was introduced before extended memory, most programs were designed to be able to use expanded memory, but not extended memory. Because expanded memory was relatively troublesome to use, it was eliminated not long after extended memory appeared.
Extended memory can only be used on 80286 or higher-grade machines. At present, on almost all machines using DOS, memory above 1 MB is extended memory. Extended memory likewise cannot be used directly by DOS. After DOS 5.0, Himem.sys, an extended memory management program, was provided, and we can use it to manage extended memory. emm386.exe can emulate extended memory (XMS) as expanded memory (EMS), to satisfy some programs that require expanded memory.
Finally, let me emphasize again: no matter how large expanded memory or extended memory is, DOS application programs can only run in conventional memory. Some programs can use a DOS extender (such as DOS4GW.exe and similar programs) to put the CPU into protected mode, thereby directly accessing extended memory; but note that after entering protected mode, the computer has left the DOS state.
Reposted from Learning Information
When the DOS operating system was first designed, the PC hardware system only supported a 1 MB addressing space, so DOS could manage at most 1 MB of continuous memory space. Within this 1 MB of memory, only 640K was reserved for application programs; it was called conventional memory or base memory. The other 384K was called upper memory, reserved for video display, BIOS, and so on. In 1982, 640K of memory seemed more than enough for microcomputers; people even believed that 640K of memory could be used to do anything. It looks a bit laughable now, but at the time, that really was the situation.
The situation now is that even if your computer has several megabytes or several dozen megabytes of memory installed, if you use the DOS operating system, then you still only have 640K of memory that can be used directly. Memory above 1 MB can only be used through some memory management tools. Fortunately, Windows
95 no longer has the conventional memory limitation; all of your memory, whether 8M or 128M, can be used directly.
Under DOS, the following four kinds of memory exist in the system:
Conventional Memory;
Upper Memory;
Expanded Memory;
Extended Memory.
Conventional memory refers to the 0–640K memory area. Under DOS, ordinary application programs can only use the system’s conventional memory, and therefore are all subject to the 640KB memory limit. Also, because DOS itself, the device drivers installed in the config.sys file, and the memory-resident programs executed in the autoexec.bat file all occupy some conventional memory, the conventional memory available to application programs is less than 640K. Very often, we have to think of every possible way to tidy up memory so as to leave enough conventional memory for some applications with relatively big “appetites”; this is surely something many computer enthusiasts from the DOS era are all too familiar with.
Upper memory refers to the 384K of memory located above conventional memory. Programs generally cannot use this memory area, but EMM386.exe can activate part of upper memory, and it allows users to load certain device drivers and user programs into upper memory with Devicehigh or LH (i.e. loadhigh). dos=high,umb also loads part of DOS into upper memory. Here umb is the abbreviation of Upper
Memory Block.
Expanded memory is an early standard for increasing memory, and can be expanded up to 32M. To use expanded memory, a special expanded memory board must be installed in the computer, and a management program for managing the expanded memory board must also be installed. Since expanded memory was introduced before extended memory, most programs were designed to be able to use expanded memory, but not extended memory. Because expanded memory was relatively troublesome to use, it was eliminated not long after extended memory appeared.
Extended memory can only be used on 80286 or higher-grade machines. At present, on almost all machines using DOS, memory above 1 MB is extended memory. Extended memory likewise cannot be used directly by DOS. After DOS 5.0, Himem.sys, an extended memory management program, was provided, and we can use it to manage extended memory. emm386.exe can emulate extended memory (XMS) as expanded memory (EMS), to satisfy some programs that require expanded memory.
Finally, let me emphasize again: no matter how large expanded memory or extended memory is, DOS application programs can only run in conventional memory. Some programs can use a DOS extender (such as DOS4GW.exe and similar programs) to put the CPU into protected mode, thereby directly accessing extended memory; but note that after entering protected mode, the computer has left the DOS state.
Reposted from Learning Information
欢迎大家观临我的个人主页:
http://dosdiy.bluepc.com.cn/
http://dosdiy.ys168.com/
EMAIL: lydong@china.com.cn lydong@yeah.net
----------------------------------------------
http://dosdiy.bluepc.com.cn/
http://dosdiy.ys168.com/
EMAIL: lydong@china.com.cn lydong@yeah.net
----------------------------------------------



