中国DOS联盟论坛

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-13 12:18
47,811 topics / 349,897 posts / today 0 new / 48,256 members
DOS学习入门 & 精彩文章 (教学室) » Question about memory management in CONFIG.SYS?
Printable Version  1,560 / 12
Floor1 hulongzhuo Posted 2007-03-18 07:03
中级用户 Posts 135 Credits 294
Recently I've been studying DOS. Although I studied it a long time ago, there are still some things I'm not very clear about. In the past two days I've looked through a lot of materials.
Regarding system configuration, such as CONFIG.SYS, there are a few points where I see many people explaining things in a confused way. First, this is how I understand it:
1, The memory managed by DOS should be divided into:
conventional memory 1-640K
upper memory (UMB) 640-1024K
high memory (HMA) the first 64K part of extended memory
expanded memory (EMS) more or less the same as extended memory
extended memory (XMS) the part after 1024K

2, DEVICE= loads drivers into conventional memory,
DEVIDEHIGH= loads drivers into high memory (HMA)
dos=high,umb means DOS manages the UMB created by EMM386.EXE, and loads part of itself into HMA

But in a lot of materials I see upper memory UMB and high memory HMA being confused with each other.
For example, some say DEVIDEHIGH= is loaded into upper memory UMB,
and dos=high is also loaded into upper memory UMB.
I don't know which one is actually correct. Also, high memory HMA is only 64K. If both drivers and part of DOS are loaded into this area, will there be any effect? And if it goes over 64K, then what?
Also, is it true that all DOS programs can only run in the 640K space? If so, then what is the real significance of the extended memory provided by HIMEM.SYS??

I'm too much of a newbie. I hope a moderator or some expert can answer, I'd be extremely grateful!!!!

[ Last edited by hulongzhuo on 2007-3-17 at 06:06 PM ]
Floor2 Michael Posted 2007-03-18 07:36
钻石会员 Posts 3,041 Credits 10,056
DOS programs can use extended memory as a data area.
Floor3 hulongzhuo Posted 2007-03-18 12:15
中级用户 Posts 135 Credits 294
All the experts, come in and talk about this!!!
Floor4 ywcn Posted 2007-03-19 04:10
初级用户 Posts 68 Credits 155
The 640-1024 area is called reserved memory, not UMB. UMB is a memory area mapped using the remaining address space in reserved memory. Note that this is "address space", which means UMB is not actually in reserved memory.
DEVIDEHIGH loads the program into UMB, dos=high loads DOS into HMA
Floor5 Michael Posted 2007-03-19 05:17
钻石会员 Posts 3,041 Credits 10,056
Wrong.
Floor6 Michael Posted 2007-03-19 05:19
钻石会员 Posts 3,041 Credits 10,056
If you can get on Wikipedia, go look it up there. The explanation is very detailed.
Floor7 hulongzhuo Posted 2007-03-19 08:02
中级用户 Posts 135 Credits 294
To the one in post #5, what's wrong about it?

Why not explain it??
Floor8 Michael Posted 2007-03-19 08:24
钻石会员 Posts 3,041 Credits 10,056
ems and xms are not almost the same, they're very different. ems is accessed by mapping into addresses below 1M, xms is not like that.
Floor9 hulongzhuo Posted 2007-03-19 21:18
中级用户 Posts 135 Credits 294
Any more? The poster above?
Floor10 ywcn Posted 2007-03-25 11:08
初级用户 Posts 68 Credits 155
Originally posted by Michael at 2007-3-18 07:24 PM:
EMS and XMS are not more or less the same; they're very different. EMS is accessed by mapping it to addresses below 1MB, while XMS is not like that.


Whew, I thought you were saying I was wrong!
Floor11 GOTOmsdos Posted 2007-03-25 12:43
铂金会员 Posts 1,827 Credits 5,154
"DEVIDEHIGH loads the program into UMB, dos=high loads DOS into HMA"
This statement may be open to discussion.
So-called HIGH may refer to both HMA and UMB, so DEVICEHIGH may be decided by DOS as loading into HMA or UMB, not limited to UMB.
If DOS=HIGH means loading DOS into HMA, then how do you explain the UMB in DOS=HIGH,UMB?
Explaining it as DOS being able to use HIGH and UMB makes more sense.. it's a kind of switch.
Of course, the prerequisites are:
DEVICE=HIMEM.SYS
DEVICE=EMM386.EXE


Originally, expanded memory and extended memory were both installed in their respective slots. Now it's just standardized. Actually, they're both on that one memory stick in your machine, not some other thing.

First there was conventional memory
Then there was expanded memory
Then there was extended memory
Now they're all on one physical device

[ Last edited by GOTOmsdos on 2007-3-25 at 12:48 PM ]
Floor12 darkradx Posted 2007-03-25 13:29
高级用户 Posts 420 Credits 972
The prerequisites for DOS=HIGH and DOS=UMB to take effect are

A20 can be turned on ------Any XMS Manager installed
UMB Exist ------UMBPCI/EMS Manager

Under the XMS management specification, the entire memory area (conventional + extended) is defined as flat, HMA is located at the lowest end of XMS, size is FFFF:FFFF-0xFFFFF. If DOS receives dos=high and successfully tries to enable a20, then it can use HMA.
EMS is page mapping-based (only after the EMS manager operates will there be UMB(Unused UMA))
DOS=HIGH and DOS=UMB each have their own function

My memory is very unclear, I can only say it roughly
Floor13 darkradx Posted 2007-03-25 13:29
高级用户 Posts 420 Credits 972
DEVICEHIGH definitely uses UMB

http://support.microsoft.com/kb/95555
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023