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-07-23 01:08
中国DOS联盟论坛 » DOS启动盘 & LOGO技术 (启动盘室) » [Discussion] About the problem of slimming down COMMAND.COM View 2,760 Replies 19
Original Poster Posted 2003-06-03 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
The necessary files such as COMMAND.COM in MS-DOS 7.x are relatively large and occupy quite a bit of space, so they should be slimmed down properly. However, software like UPX, aPack, etc., cannot compress it. And the result of compression with COMPREXE is that it can run but cannot be used as a SHELL; otherwise, an "Invalid COMMAND.COM" error will occur.

I observed and found that COMMAND.COM can currently be reduced by at most 2 bytes, not even 3 bytes. It is also possible to add bytes or modify the original bytes, but just cannot reduce by more than 2 bytes. Obviously, COMMAND.COM will perform a volume check when acting as a SHELL, and it won't work if it is less than 94,290 bytes. Does anyone have a way to solve this?
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 2 Posted 2003-06-03 00:00 ·  中国 黑龙江 哈尔滨 道外区 联通
高级用户
★★
Credits 830
Posts 233
Joined 2002-11-29 00:00
23-year member
UID 364
Gender Male
Status Offline
From a cracking perspective! He is checking his own size, right! You don't let him check! He uses conditional statements! You use unconditional statements! Then change the size to the size you modified! Don't look at me with an adoring eye! I just know the principle! I don't know the method!
┃ \\\\//// ┃通缉:杨小邪 特点:贼丑
┃ (-●●-) ┃年龄:刚成年 性别:男
┃ \ / ┃罪名:长的丑/总想见网友
┃ \︶/ ┃犯罪事实:吓死一片~
Floor 3 Posted 2003-06-03 00:00 ·  中国 湖北 武汉 江夏区 电信
元老会员
★★★★★
步行的人
Credits 9,654
Posts 3,351
Joined 2003-03-11 00:00
23-year member
UID 1113
Gender Male
From 湖北
Status Offline
Haha.....I can say it too. Who will come to worship me.....
弄花香满衣,掬水月在手。
明月鹭鸟飞, 芦花白马走。
我自一过后,野渡现横舟。
青云碧空在,净瓶水不流。
http://dos.e-stone.cn/guestbook/index.asp
======中國DOS聯盟=====
我的新网页http://rsds.7i24.com欢迎光顾
Floor 4 Posted 2003-06-04 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
Experts like Roy, lydong, etc., also come and share the methods.
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 5 Posted 2003-06-05 00:00 ·  中国 四川 眉山 电信
中级用户
★★
Credits 355
Posts 99
Joined 2003-01-06 00:00
23-year member
UID 690
Gender Male
Status Offline
There was a game before that needed to play a movie file larger than 10M. As a result, when I checked the executable file, there were only two places at 10M. The first time it wasn't right, the second time..... From then on, that game could be played on the hard drive.

............Give it a try.
Floor 6 Posted 2003-06-13 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
Just now I did some research on COMMAND.COM and found that it's really not easy to drastically streamline COMMAND.COM, unless some major modifications are made. Because COMMAND.COM directly accesses the internal addresses of files, unlike ordinary programs. For example, by modifying the 5F10H position in COMMAND.COM, at least tens of bytes of content in COMMAND.COM can be reduced, but to streamline further, more content in COMMAND.COM needs to be modified. I hope everyone can work together.
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 7 Posted 2003-06-13 00:00 ·  中国 辽宁 葫芦岛 联通
初级用户
★★
Credits 672
Posts 216
Joined 2003-06-12 00:00
23-year member
UID 4976
Gender Female
Status Offline
The command program is just an external command parsing program. Why can't we replace it with others? For example, ndos
我是女孩,我怕谁?
Floor 8 Posted 2003-06-13 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
The following is a quote from dos era rookie on 2003-6-13 9:26:29:
The COMMAND program is just an external command parsing program. Why can't we replace it with others? For example, NDOS


Because NDOS and others do not support long filenames. However, COMMAND in MS-DOS 7.10 fully supports long filenames under DOSLFN and has good compatibility.
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 9 Posted 2003-06-13 00:00 ·  中国 香港
管理员
★★★★
專業島民
Credits 4,869
Posts 1,633
Joined 2002-12-10 00:00
23-year member
UID 465
Gender Male
Status Offline
Use the COMMAND.COM of ROM-DOS
我的網站:http://mw16.2ya.com/ 我的網誌: http://scrappedblog.blogspot.com/
~
我的Winamp正在播放的歌曲:
Floor 10 Posted 2003-06-13 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
The following is a quote from Roy at 2003-6-13 15:35:51:
Use the COMMAND.COM of ROM-DOS


There are some problems with the cooperation between COMMAND.COM of ROM-DOS and MS-DOS 7.10, and it does not support commands like LOCK.
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 11 Posted 2003-06-13 00:00 ·  中国 上海 电信
金牌会员
★★★★
小飞侠
Credits 4,590
Posts 1,812
Joined 2003-04-02 00:00
23-year member
UID 1400
Gender Male
From 上海市
Status Offline
The new logo of moderator Wengier is quite beautiful!
It's a pity why a boy would choose a girl's avatar as the logo,
In comparison, the avatars of Roy and Master Rushiyou are more manly!
Floor 12 Posted 2003-06-13 00:00 ·  中国 上海 电信
金牌会员
★★★★
小飞侠
Credits 4,590
Posts 1,812
Joined 2003-04-02 00:00
23-year member
UID 1400
Gender Male
From 上海市
Status Offline
And also hope that moderator Wengier can successfully compress command!
Floor 13 Posted 2003-06-14 00:00 ·  中国 广东 广州 电信
元老会员
★★★
Credits 1,468
Posts 407
Joined 2002-10-21 00:00
23-year member
UID 34
Gender Male
From 广州
Status Offline
The following is a quote from Wengier on 2003-6-4 19:36:34:
Experts like Roy, lydong, etc., also come and share some methods.

Being called a "expert" by Wengier really makes me feel unworthy (a bit embarrassed)! In the forum, I mainly am still learning from everyone. Although I am very interested in researching DOS-related issues with everyone, my own knowledge is superficial, and I really don't dare to be in the "expert" category (a bit ashamed)...

Regarding the problem mentioned above, I think whether COMMAND.COM can also be divided into several segments like when streamlining IO.SYS, and some unimportant contents can be removed to achieve streamlining. Secondly, the program that checks the size of COMMAND.COM should be in IO.SYS, because when other SHELLs are replaced, there will be the same error prompt. The problem should not be with COMMAND.COM itself. Instead, it is the check by IO.SYS on the size of COMMAND.COM that causes the issue. I don't know if what I said is correct. Please give me your advice, Wengier!
欢迎大家观临我的个人主页:

http://dosdiy.bluepc.com.cn/
http://dosdiy.ys168.com/


EMAIL: lydong@china.com.cn lydong@yeah.net
----------------------------------------------
Floor 14 Posted 2003-06-14 00:00 ·  美国 肯塔基州 费耶特县 列克星敦 Charter_Communications
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
The following is a quote from lydong on 2003-6-14 4:19:17:
   Among the problems mentioned above, I wonder if COMMAND.COM can also be divided into several segments like when slimming down IO.SYS, and some unimportant contents removed to achieve slimming. Secondly, the program to check the size of COMMAND.COM should be in IO.SYS, because when replacing with other SHELLs, there will be the same error prompt, the problem should not be with COMMAND.COM itself. Instead, it is the check of the size of COMMAND.COM by IO.SYS that causes the problem. I don't know if it's right. Please give your instructions, Wengier!


Alas, it's not like that. As I observed, the structures of IO.SYS and COMMAND.COM are completely different, so the previous experience of slimming down IO.SYS cannot be applied to COMMAND.COM. What was done to IO.SYS is slimming, while for COMMAND.COM it can only be compressed. But the size check is not in IO.SYS, but inside COMMAND.COM, which has been confirmed by my research and experiments, but there is currently no good solution.
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 15 Posted 2003-06-14 00:00 ·  中国 上海 电信
金牌会员
★★★★
小飞侠
Credits 4,590
Posts 1,812
Joined 2003-04-02 00:00
23-year member
UID 1400
Gender Male
From 上海市
Status Offline
This is troublesome. First, compress it to know the volume after compression, then modify the address of the annotation file volume in the uncompressed command, and finally compress this program again in the same way! It's really troublesome!
Forum Jump: