![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-12 17:29 |
47,811 topics / 349,897 posts / today 0 new / 48,256 members |
| DOS学习入门 & 精彩文章 (教学室) » Repost: Understanding DOS Memory |
| Printable Version 2,748 / 6 |
| Floor1 MYS | Posted 2002-11-16 00:00 |
| 元老会员 Posts 1,637 Credits 5,170 From 广东佛山 | |
|
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. |
|
| Floor2 Wengier | Posted 2002-11-16 00:00 |
| 系统支持 Posts 10,521 Credits 27,736 | |
|
This article was posted by a forum member on this forum before. At the time I pointed out that there was a major error in it, namely that the last sentence was completely wrong, and it should be changed to: "the computer leaves the usual real-mode DOS state and enters the protected-mode DOS state."
|
|
| Floor3 yiyesong | Posted 2002-11-17 00:00 |
| 元老会员 Posts 632 Credits 1,987 | |
|
This is the introduction to DOS memory from Hongen's "Getting Started with DOS." Everyone can go to the thread "Friends who need a DOS beginner's tutorial, please come in" in DOS Usage Experience & Excellent Articles to download it.
|
|
| Floor4 larrysun | Posted 2009-03-12 01:38 |
| 新手上路 Posts 7 Credits 13 | |
|
Already read it
|
|
| Floor5 wangfangjian | Posted 2009-03-14 10:22 |
| 中级用户 Posts 192 Credits 274 | |
|
Thanks for sharing
|
|
| Floor6 ben1314 | Posted 2009-03-15 01:33 |
| 初级用户 Posts 16 Credits 25 From 河南新乡 | |
|
Thanks bump
|
|
| Floor7 qjfke | Posted 2009-04-09 22:43 |
| 初级用户 Posts 11 Credits 20 | |
|
Let me take a look
|
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |