China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-13 11:18
中国DOS联盟论坛 » DOS学习入门 & 精彩文章 (教学室) » Question about memory management in CONFIG.SYS? View 1,557 Replies 12
Original Poster Posted 2007-03-18 07:03 ·  中国 广东 东莞 电信
中级用户
★★
Credits 294
Posts 135
Joined 2007-03-09 14:47
19-year member
UID 81212
Gender Male
Status Offline
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 ]
Floor 2 Posted 2007-03-18 07:36 ·  中国 山东 济南 移动
钻石会员
★★★★★
Credits 10,056
Posts 3,041
Joined 2002-11-11 00:00
23-year member
UID 223
Gender Male
Status Offline
DOS programs can use extended memory as a data area.
简单就是美
Floor 3 Posted 2007-03-18 12:15 ·  中国 广东 东莞 电信
中级用户
★★
Credits 294
Posts 135
Joined 2007-03-09 14:47
19-year member
UID 81212
Gender Male
Status Offline
All the experts, come in and talk about this!!!
Floor 4 Posted 2007-03-19 04:10 ·  中国 山西 晋城 联通
初级用户
★★
Credits 155
Posts 68
Joined 2007-02-02 23:29
19-year member
UID 78450
Gender Male
Status Offline
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
Floor 5 Posted 2007-03-19 05:17 ·  中国 山东 济南 移动
钻石会员
★★★★★
Credits 10,056
Posts 3,041
Joined 2002-11-11 00:00
23-year member
UID 223
Gender Male
Status Offline
Wrong.
简单就是美
Floor 6 Posted 2007-03-19 05:19 ·  中国 山东 济南 移动
钻石会员
★★★★★
Credits 10,056
Posts 3,041
Joined 2002-11-11 00:00
23-year member
UID 223
Gender Male
Status Offline
If you can get on Wikipedia, go look it up there. The explanation is very detailed.
简单就是美
Floor 7 Posted 2007-03-19 08:02 ·  中国 广东 东莞 电信
中级用户
★★
Credits 294
Posts 135
Joined 2007-03-09 14:47
19-year member
UID 81212
Gender Male
Status Offline
To the one in post #5, what's wrong about it?

Why not explain it??
Floor 8 Posted 2007-03-19 08:24 ·  中国 山东 济南 移动
钻石会员
★★★★★
Credits 10,056
Posts 3,041
Joined 2002-11-11 00:00
23-year member
UID 223
Gender Male
Status Offline
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.
简单就是美
Floor 9 Posted 2007-03-19 21:18 ·  中国 广东 东莞 电信
中级用户
★★
Credits 294
Posts 135
Joined 2007-03-09 14:47
19-year member
UID 81212
Gender Male
Status Offline
Any more? The poster above?
Floor 10 Posted 2007-03-25 11:08 ·  中国 山西 晋城 联通
初级用户
★★
Credits 155
Posts 68
Joined 2007-02-02 23:29
19-year member
UID 78450
Gender Male
Status Offline
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!
Floor 11 Posted 2007-03-25 12:43 ·  中国 广东 广州 教育网
铂金会员
★★★★
C++启程者
Credits 5,154
Posts 1,827
Joined 2003-07-18 00:00
23-year member
UID 7105
Gender Male
Status Offline
"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 ]
Floor 12 Posted 2007-03-25 13:29 ·  中国 广东 深圳 电信
高级用户
★★★
Credits 972
Posts 420
Joined 2004-05-16 00:00
22-year member
UID 24467
Gender Male
Status Offline
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
平生进退如飙风
Floor 13 Posted 2007-03-25 13:29 ·  中国 广东 深圳 电信
高级用户
★★★
Credits 972
Posts 420
Joined 2004-05-16 00:00
22-year member
UID 24467
Gender Male
Status Offline
DEVICEHIGH definitely uses UMB

http://support.microsoft.com/kb/95555
平生进退如飙风
Forum Jump: