![]() |
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-09-15 00:48 |
47,812 topics / 349,917 posts / today 0 new / 48,268 members |
| DOS开发编程 & 发展交流 (开发室) » My little experience, for the parts that are not good, everyone can give guidance |
| Printable Version 1,852 / 6 |
| Floor1 dos时代菜鸟 | Posted 2003-06-15 00:00 |
| 初级用户 Posts 216 Credits 672 | |
|
### 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 /write n. 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 |
|
| Floor2 Wengier | Posted 2003-06-15 00:00 |
| 系统支持 Posts 10,521 Credits 27,736 | |
The following is a quote from dos时代菜鸟 on 2003-6-15 12:30:55: 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. |
|
| Floor3 ko20010214 | Posted 2003-06-15 00:00 |
| 版主 Posts 1,628 Credits 7,296 | |
|
Good post, welcome everyone to post more such experience and reflection posts!
|
|
| Floor4 如是大师 | Posted 2003-06-15 00:00 |
| 元老会员 Posts 3,351 Credits 9,654 From 湖北 | |
|
Support
|
|
| Floor5 dos时代菜鸟 | Posted 2003-06-15 00:00 |
| 初级用户 Posts 216 Credits 672 | |
|
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.
|
|
| Floor6 dos时代菜鸟 | Posted 2003-06-16 00:00 |
| 初级用户 Posts 216 Credits 672 | |
|
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.
|
|
| Floor7 Wengier | Posted 2003-06-16 00:00 |
| 系统支持 Posts 10,521 Credits 27,736 | |
The following is the speech of dos era newbie on 2003-6-15 23:57:11: 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~~ |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |