中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

中国DOS联盟论坛
现在时间是 2026-08-01 12:43
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » (已结)不想使用PERUSE--为什么>重定向无效 查看 1,798 回复 2
楼 主 (已结)不想使用PERUSE--为什么>重定向无效 发表于 2005-09-12 00:46 ·  中国 上海 杨浦区 电信
高级用户
★★★
积分 916
发帖 377
注册 2004-03-08 00:00
22年会员
UID 19523
性别 男
状态 离线
下面的批处理超过屏幕显示范围,不想使用peruse滚屏,想简单点
xdma.bat > a.txt
edit a.txt
使用edit编辑器来阅读输出。在xp cmd下没问题,可是为什么ms-dos7.1启动盘会不支持重定向了,还是写法有问题,谢谢

@if "%1"=="" goto USG
@rem Setup and Configuration
@%ramd%:\driver\devload %ramd%:\driver\xdma.sys /%1 /%2 /%3 /%4
@goto END
:USG
@echo XDMA switch options are as follows:

@echo /O Enables output overlap.

@echo /L Limits DMA to "low memory" below 640K. /L is REQUIRED to use
@echo UMBPCI or similar drivers whose upper-memory areas cannot do
@echo DMA. When /L is given, XDMA must reside in LOW memory (I-O
@echo command-lists use DMA), or driver loading ABORTS! /L makes
@echo XDMA use its "local buffer" for I-O of data above 640K.

@echo /Mn Specifies the MAXIMUM UltraDMA "mode" to be used by all disks,
@echo where n is a number between 0 and 7, as follows:
@echo 0 = ATA-16, 16 MB/sec. 4 = ATA-66, 66 MB/sec.
@echo 1 = ATA-25, 25 MB/sec. 5 = ATA-100, 100 MB/sec.
@echo 2 = ATA-33, 33 MB/sec. 6 = ATA-133, 133 MB/sec.
@echo 3 = ATA-44, 44 MB/sec. 7 = ATA-166, 166 MB/sec.
@echo Disks designed to a "mode" LESS than the given value will be
@echo limited to their own highest "mode". Every disk's designed
@echo "mode" should be preset by the BIOS, even if the BIOS itself
@echo does no UltraDMA I-O. At present, "mode 7" ATA-166 has not
@echo been implemented, but XDMA can set it, if disks ever use it.

@echo /Q Suppresses the "beep" on output-overlap errors ("quiet" mode).

@echo Most users require only /O to enable output overlap or /L if UMBPCI (or
@echo similar) is also loaded. /M and /Q are for diagnostic work. For all
@echo switches, a dash may replace the slash, and lower-case letters are O.K.
@goto END
:END


[ Last edited by willsort on 2005-9-12 at 16:46 ]
2 发表于 2005-09-12 08:56 ·  中国 山西 运城 中移铁通
元老会员
★★★★
Batchinger
积分 4,432
发帖 1,512
注册 2002-10-18 00:00
23年会员
UID 19
性别 男
状态 离线
Re dato:

在 MSDOS 和 Win9x COMMAND 下是不支持重定向批处理程序的,因为批处理不同于一般的可执行文件,它是被 COMMAND 解释的脚本。

在相应环境下要重定向批处理程序的输出,可以使用以下方式间接实现:

%comspec% /c xdma.bat > a.txt

此时,重定向的是命令解释器 COMMAND.COM 的输出。

最后,谢谢你提供在 NT CMD 下可以重定向批处理程序的信息!
※ Batchinger 致 Bat Fans:请访问 批处理编程的异类 ,欢迎交流与共享批处理编程心得!
3 发表于 2005-09-12 16:39 ·  中国 上海 杨浦区 电信
高级用户
★★★
积分 916
发帖 377
注册 2004-03-08 00:00
22年会员
UID 19523
性别 男
状态 离线
论坛跳转: