Understanding DOS Memory
When the DOS operating system was first designed, the PC hardware system supported only a 1MB addressing space, so DOS could manage only up to 1MB of contiguous memory. Of this 1MB of memory, only 640K was reserved for application programs; this was called conventional memory or base memory. The other 384K was called upper memory and was reserved for video display, BIOS, and so on. In 1982, 640K of memory seemed more than enough for microcomputers, and people even thought that 640K of memory could be used to do anything. It seems 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 have only 640K of memory that you can use directly. Memory above 1MB can be used only through some memory management tools. Fortunately, Windows 95 no longer has the conventional memory limitation. All your memory, whether 8MB or 128MB, can be used directly.
Under DOS, there are the following four types of memory 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 generally use only the system's conventional memory, and therefore are all subject to the 640KB memory limit. Also, since DOS itself, the device drivers installed in config.sys, and the memory-resident programs executed in autoexec.bat all occupy some conventional memory, the conventional memory available to applications is less than 640K. Very often, we have to rack our brains to arrange memory properly so as to leave enough conventional memory for some applications with a bigger "appetite." This is surely something many computer enthusiasts from the DOS era are thoroughly 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 the user to load certain device drivers and user programs into upper memory with Devicehigh or LH (that is, loadhigh). dos=high,umb also loads part of DOS into upper memory. The umb here is the abbreviation of Upper Memory Block.
Expanded memory was an early standard for increasing memory, and it could be expanded up to 32MB. To use expanded memory, a special expanded memory board had to be installed in the computer, and a manager for the expanded memory board also had to be installed. Since expanded memory appeared before extended memory, most programs were designed to use expanded memory, but not extended memory. Because expanded memory was rather troublesome to use, it was phased out soon after extended memory appeared.
Extended memory can only be used on 80286 or higher-grade machines. At present, on almost all DOS machines, memory above 1MB is extended memory. Extended memory likewise cannot be used directly by DOS. After DOS 5.0, DOS provided Himem.sys, this extended memory manager, 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 once again that no matter how much expanded memory or extended memory there is, DOS applications 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, thus directly accessing extended memory; but note that after entering protected mode, the computer leaves the DOS state.
When the DOS operating system was first designed, the PC hardware system supported only a 1MB addressing space, so DOS could manage only up to 1MB of contiguous memory. Of this 1MB of memory, only 640K was reserved for application programs; this was called conventional memory or base memory. The other 384K was called upper memory and was reserved for video display, BIOS, and so on. In 1982, 640K of memory seemed more than enough for microcomputers, and people even thought that 640K of memory could be used to do anything. It seems 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 have only 640K of memory that you can use directly. Memory above 1MB can be used only through some memory management tools. Fortunately, Windows 95 no longer has the conventional memory limitation. All your memory, whether 8MB or 128MB, can be used directly.
Under DOS, there are the following four types of memory 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 generally use only the system's conventional memory, and therefore are all subject to the 640KB memory limit. Also, since DOS itself, the device drivers installed in config.sys, and the memory-resident programs executed in autoexec.bat all occupy some conventional memory, the conventional memory available to applications is less than 640K. Very often, we have to rack our brains to arrange memory properly so as to leave enough conventional memory for some applications with a bigger "appetite." This is surely something many computer enthusiasts from the DOS era are thoroughly 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 the user to load certain device drivers and user programs into upper memory with Devicehigh or LH (that is, loadhigh). dos=high,umb also loads part of DOS into upper memory. The umb here is the abbreviation of Upper Memory Block.
Expanded memory was an early standard for increasing memory, and it could be expanded up to 32MB. To use expanded memory, a special expanded memory board had to be installed in the computer, and a manager for the expanded memory board also had to be installed. Since expanded memory appeared before extended memory, most programs were designed to use expanded memory, but not extended memory. Because expanded memory was rather troublesome to use, it was phased out soon after extended memory appeared.
Extended memory can only be used on 80286 or higher-grade machines. At present, on almost all DOS machines, memory above 1MB is extended memory. Extended memory likewise cannot be used directly by DOS. After DOS 5.0, DOS provided Himem.sys, this extended memory manager, 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 once again that no matter how much expanded memory or extended memory there is, DOS applications 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, thus directly accessing extended memory; but note that after entering protected mode, the computer leaves the DOS state.
我的网志
http://hzmys.blog.163.com/
我的网盘
firststep.qjwm.com
fsmys.ys168.com
ssmys.ys168.com
www.brsbox.com/fsmys
www.brsbox.com/ssmys
www.brsbox.com/ccdos
http://hzmys.blog.163.com/
我的网盘
firststep.qjwm.com
fsmys.ys168.com
ssmys.ys168.com
www.brsbox.com/fsmys
www.brsbox.com/ssmys
www.brsbox.com/ccdos


