Baizi asked about DOS memory. Generally, DOS memory is closely related to the config file. So I’ll talk about it here. In the early PC era, computer hardware only supported 1MB of address space. Back then, hard disks were luxury items. Operating systems ran from floppy disks. That was the age when PCTools and HDCopy ruled the scene. At that time, DOS, the main operating system, was also limited by the hardware and could only manage up to 1MB of contiguous memory space. Of this 1MB, only 640K was left for applications; this 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 thought 640K of memory could be used to do anything. Looking back now it seems a bit funny, but at the time, that really was the situation.
But now that times have developed to this point, memory in personal computers is easily measured in hundreds of MB. So, when we use DOS, do we still have to be limited by the so-called 640K memory limit? We can say no. We can use large memory through certain memory management tools.
Actually, by the Win95 era MS had already solved this problem quite well
Under DOS, there are the following four kinds 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 applications can generally use only the system’s conventional memory, and therefore are all subject to the 640KB memory limit. Also, DOS itself, device drivers loaded in config.sys, and TSR programs run from autoexec.bat all take up some conventional memory, so the amount of conventional memory available to applications is less than 640K. Very often, we had to rack our brains organizing memory in order to leave enough conventional memory for applications with a bigger “appetite.” I imagine many DOS-era computer enthusiasts are deeply familiar with this.
Upper memory refers to the 384K 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 (that is, loadhigh). dos=high,umb also puts part of DOS into upper memory. Here, UMB is short for Upper Memory Block.
Expanded memory was an early memory expansion standard, expandable up to 32M at most. To use expanded memory, a special expanded memory board had to be installed in the computer, and a manager for that 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 troublesome to use, it was phased out soon after extended memory appeared.
Extended memory can only be used on 80286 or higher-class machines. At present, on nearly all DOS machines, memory above 1M is extended memory. Extended memory likewise cannot be used directly by DOS. After DOS 5.0, Himem.sys was provided as an extended memory manager, and we can manage extended memory through it. emm386.exe can emulate extended memory (XMS) as expanded memory (EMS), to satisfy some programs that require expanded memory.
Finally, let me emphasize once more: no matter how large expanded memory or extended memory is, DOS applications can only run in conventional memory. Some programs can use a DOS extender (such as DOS4GW.exe and the like) to put the CPU into protected mode, thereby directly accessing extended memory; but note that once protected mode is entered, the computer has left the DOS state.
(This is something I organized based on related materials. Not finished yet, to be continued.)