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-31 22:59
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » My little experience, for the parts that are not good, everyone can give guidance View 1,766 Replies 6
Original Poster Posted 2003-06-15 00:00 ·  中国 辽宁 沈阳 联通
初级用户
★★
Credits 672
Posts 216
Joined 2003-06-12 00:00
23-year member
UID 4976
Gender Female
Status Offline
### Insights on Writing BAT Files

1. **doslfn**
The cp936uni.tbl of doslfn can support the display of Chinese long filenames, but if it is called using the lh command, it will not support Chinese.

2. **pc-cache**
A small tool in pctools90 includes three basic components: pc-cache.com / pc-ex2x.ovl / pc-wnerr.ov. During the startup process, excessive memory usage may cause the hard disk or even the floppy drive to fail to read data normally. You can load himem.sys in config.sys and add the pc-cache command to the starting statement in autoexec.bat to pre-allocate sufficient cache for each drive. For example: pc-cache sizext:5120 /writen. The pc-cache.com can be compressed by pklite by 28%.

3. **diskgen**
Many people like to use the diskgen partition software, but I found that if the memory is not loaded properly, this software cannot be used. My experience tells me that if dos=high is set in config.sys, it is very easy to get a system crash when running diskgen. If set to dos=low, it will be much better.

4. **Menus**
Many people use various menu editors to call batch programs. In fact, there is a very good internal function instruction in ndos/4dos that can complete menu editing, and the generated menu is in the form of a scrolling bright bar in the window, that is, countless options can be displayed in a small window.
%@select
The above function means to create a window in the area from x1, y1 to x2, y2, and the content of the text file is displayed in the window. The user can select a line of content in the text file through the "up and down" keys. When the user presses the Enter key, the function returns the content of the selected line to the environment. We can use the following example to illustrate:
There is a text file name, abc.txt, and the content is as follows:
1.dm
2.spfdisk
3.vc
4.ndd
5.exit

We can write the l.bat file with the following content to complete the menu selection purpose

@echo off
setlocal
:loop
cls
set ccc=%@select
if %ccc%*==1.dm* goto dm
if %ccc%*==2.spfdisk* goto spfdisk
if %ccc%*==3.vc* goto vc
if %ccc%*==4.ndd* goto ndd
if %ccc%*==5.exit* goto end
:dm
dm
goto loop
:spfdisk
spfdisk
goto loop
:vc
vc
goto loop
:ndd
ndd
goto loop
:end
cls
endlocal

When you need to run it, just run l under the ndos/4dos environment or run ndos/c l under the msdos environment.

5. **Regarding the Garbled Screen Problem of UCDOS in Windows**
In fact, this is the reason for the default screen display mode of UCDOS. We can modify the sentence "knl %2" in the ucdos.bat file to "knl vesa".

6. **Regarding ndos/4dos**
I also often use 4dos, but only recently did I start to feel that the stability of ndos is stronger than that of 4dos. Both 4dos and ndos are super easy-to-use shell programs used as shells. Some people react that ndos is too outdated and 4dos is too large. In fact, I have a good way to solve this problem. Usually, we will choose to use 4dos to replace command in msdos as the command shell. The reason why we do not use ndos is that ndos does not support long filenames. In fact, we can use the method of command + ndos to solve this problem. We can compress ndos with pklite. Generally, use the command of msdos as the startup shell. When ndos is needed, use the way of "ndos/c command" to temporarily use ndos as the secondary shell. In addition, the purpose of us using doslfn to display long filenames is nothing more than to view/copy/move/delete files, etc. Although ndos does not support long filenames, after running doslfn in the ndos state, we can operate long filename files through the vc software.
As the saying goes, "different people like different things". The volume of 4dos is much larger than (command.com + compressed ndos.com). And if 4dos is compressed with pklit and then used as a shell, it will be unstable.

7. **Regarding the Realization Method of Displaying a Small Number of Chinese Characters Without Entering the Chinese Character System**
There is a tool software called bt/bte, which not only has many bat enhancement functions (such as sound effects, short animations, enhanced judgment statements, etc.), but also provides a way to display a small number of Chinese characters without entering the Chinese character system, which is the bt program. It can compile the Chinese characters to be used in advance into a program. When this font library program is executed, it will modify the character patterns of ASCII codes 128 ̄255. Up to 64 Chinese characters. This is sufficient for writing general bat files. Download address: http://zql3322.3322.net in the dos tools.
The Chinese characters in my ghost2003 tool disk are made with this tool (because of the floppy disk space limit, it is impossible to put the Chinese character system in).

2003.6.13 DOS Era Novice http://zql3322.3322.net Cabin Consultant
我是女孩,我怕谁?
Floor 2 Posted 2003-06-15 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时代菜鸟 on 2003-6-15 12:30:55:
1. doslfn
  The cp936uni.tbl of doslfn can support the display of Chinese long file names, but if it is called with the lh command, it will not support Chinese.


No way. The Chinese long file name support of DOSLFN was completed with my help by the author of DOSLFN. I always load DOSLFN with the command LH DOSLFN /Z:CP936UNI.TBL, but I have never had the phenomenon of not supporting Chinese long file names.
Wengier - 新DOS时代

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

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

Floor 3 Posted 2003-06-15 00:00 ·  中国 江西 吉安 电信
版主
★★★★
Credits 7,296
Posts 1,628
Joined 2002-10-16 12:00
23-year member
UID 10
Gender Male
Status Offline
Good post, welcome everyone to post more such experience and reflection posts!
ko20010214
=================================
大功告成,打个Kiss!
ko20010214@MSN.com
神州优雅Q300C
Intel CeleronM 370处理器 | 256MbDDR内存
40G硬盘 | USB2.0 | IEEE 1394
13.3 ' WXGA 宽屏(16:10) | COMBO光驱
10/100M网卡 | 四合一读卡器
Floor 4 Posted 2003-06-15 00:00 ·  中国 湖北 武汉 蔡甸区 电信
元老会员
★★★★★
步行的人
Credits 9,654
Posts 3,351
Joined 2003-03-11 00:00
23-year member
UID 1113
Gender Male
From 湖北
Status Offline
Support
弄花香满衣,掬水月在手。
明月鹭鸟飞, 芦花白马走。
我自一过后,野渡现横舟。
青云碧空在,净瓶水不流。
http://dos.e-stone.cn/guestbook/index.asp
======中國DOS聯盟=====
我的新网页http://rsds.7i24.com欢迎光顾
Floor 5 Posted 2003-06-15 00:00 ·  中国 辽宁 沈阳 联通
初级用户
★★
Credits 672
Posts 216
Joined 2003-06-12 00:00
23-year member
UID 4976
Gender Female
Status Offline
I'm not very proficient in the use of doslfn yet. Maybe there's a problem with my memory settings. My sound card is an S3 PCI one. To run it under DOS, a larger amount of memory is needed. It might be due to this reason, who knows. Thanks to the webmaster for the instruction.
我是女孩,我怕谁?
Floor 6 Posted 2003-06-16 00:00 ·  中国 辽宁 沈阳 联通
初级用户
★★
Credits 672
Posts 216
Joined 2003-06-12 00:00
23-year member
UID 4976
Gender Female
Status Offline
And also, after loading doslfn with msdos_command.com, when using VC to operate files, some files whose lengths are within the 8.3 standard are still inexplicably renamed to names like *~1, ~2, ~3, etc. I don't know why.
我是女孩,我怕谁?
Floor 7 Posted 2003-06-16 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 the speech of dos era newbie on 2003-6-15 23:57:11:
I'm not very proficient in the use of doslfn. Maybe there's a problem with my memory settings. My sound card is an S3 PCI one. To run it under DOS, a larger amount of memory is needed. It might be due to this reason, I'm not sure.
Thank you, webmaster for your guidance


You're welcome~~ I think it might be because there's relatively little free UMB memory, so when using LH, CP936UNI.TBL can't be loaded into the UMB, so it can't support Chinese long filenames. As for my system (it's MS-DOS 7.1), there are generally about 630KB of free conventional memory and about 100KB of free UMB memory, so I haven't had this kind of problem~~
Wengier - 新DOS时代

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

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

Forum Jump: