|
freetree
初级用户
 
积分 31
发帖 9
注册 2007-1-18
状态 离线
|
 『楼 主』:
DOS概念:控制台,CON
使用 LLM 解释/回答一下
DOS概念:控制台,CON
DOS系统在缺省情况下,从键盘接受用户的指令,并把命令的执行结果输出到显示器屏幕。当一条DOS命令的语法或出错信息中提到控制台时,它实际上作为一个单元,指的就是显示器和键盘。
DOS系统有一个内部设备驱动程序,叫做CON,当有打印机或其他设备与系统相连时,使用户可以访问控制台。关于控制台CON,最要紧的是记住:当一条DOS命令引用CON时,如果将CON作为源参数,则CON指的就是键盘;如果将CON作为目标参数,则CON指的就是屏幕。
请看以下两个例子。
例1. 创建批处理文件TIMEDATE.BAT。
COPY CON TIMEDATE.BAT
TIME
DATE
^Z
我们关心的是命令“COPY CON TIMEDATE.BAT”。这里,CON是源参数,指键盘,TIMEDATE.BAT是目标文件,全句的意思是,从键盘拷贝到TIMEDATE.BAT文件中。
例2. 看一个和例1相反的过程。
COPY CONFIG.SYS CON
这里,CONFIG.SYS 是源文件,CON是目标参数,指屏幕,全句的意思是把CONFIG.SYS拷贝到屏幕上,其作用和TYPE CONFIG.SYS相当。
例3. 把打印机作为打字机来用。
COPY CON PRN
这里,CON是源参数,为键盘,目标参数是PRN(打印机驱动程序,访问和LPT1相连的打印机)。执行本命令后,DOS就等待用户从键盘输入。当输入结束时,按F6,回车,打印机就立即输出用户刚刚输入的文本。
DOS Concepts: Console, CON
By default, the DOS system receives user instructions from the keyboard and outputs the execution results of commands to the display screen. When the syntax or error message of a DOS command mentions the console, it actually refers to the monitor and keyboard as a unit.
The DOS system has an internal device driver called CON, which allows users to access the console when a printer or other device is connected to the system. The most important thing to remember about the console CON is: when a DOS command refers to CON, if CON is used as a source parameter, then CON refers to the keyboard; if CON is used as a target parameter, then CON refers to the screen.
Please see the following two examples.
Example 1. Create a batch file TIMEDATE.BAT.
COPY CON TIMEDATE.BAT
TIME
DATE
^Z
We are concerned with the command "COPY CON TIMEDATE.BAT". Here, CON is the source parameter, referring to the keyboard, and TIMEDATE.BAT is the target file. The whole sentence means that it copies from the keyboard to the TIMEDATE.BAT file.
Example 2. Look at the opposite process of Example 1.
COPY CONFIG.SYS CON
Here, CONFIG.SYS is the source file, and CON is the target parameter, referring to the screen. The whole sentence means that it copies CONFIG.SYS to the screen, and its function is equivalent to TYPE CONFIG.SYS.
Example 3. Use the printer as a typewriter.
COPY CON PRN
Here, CON is the source parameter, which is the keyboard, and the target parameter is PRN (printer driver, accessing the printer connected to LPT1). After executing this command, DOS waits for the user to input from the keyboard. When the input is finished, press F6 and enter, and the printer will immediately output the text that the user just entered.
此帖被 +9 点积分 点击查看详情 评分人:【 redtek 】 | 分数: +8 | 时间:2007-2-6 23:22 | 评分人:【 oilio 】 | 分数: +1 | 时间:2007-2-7 02:38 |
|
|
|
2007-2-4 10:47 |
|
|
freetree
初级用户
 
积分 31
发帖 9
注册 2007-1-18
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
我准备在有空的时候写另一个有关的概念重定向。
I'm going to write another concept redirection when I have free time.
|
|
2007-2-4 19:53 |
|
|
lizaoyou
中级用户
  
积分 210
发帖 85
注册 2007-1-14 来自 广东广州
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
支持多些基本概念的简明教程,对我等菜菜帮助不小。
A concise tutorial supporting more basic concepts is quite helpful for us novices.
|
|
2007-2-5 08:25 |
|
|
gqnboy
初级用户
 
积分 122
发帖 9
注册 2004-1-24
状态 离线
|
|
2007-2-5 11:56 |
|
|
gxsanhen
初级用户
 
积分 68
发帖 29
注册 2006-9-9
状态 离线
|
|
2007-2-6 12:50 |
|
|
oilio
高级用户
    前进者
积分 641
发帖 303
注册 2007-1-10
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
嗯,谢谢,"copy con 文件名"这个知道,当目标参数才知道,谢谢。
Well, thanks. I know "copy con filename", but I just learned about the target parameter, thanks.
|

我相信总有一天,总会遇到一个人可以相濡以沫、相吻以湿! |
|
2007-2-7 02:39 |
|
|
yhl
初级用户
 
积分 28
发帖 16
注册 2007-3-31
状态 离线
|
|
2007-3-31 13:56 |
|
|
lyflpf
新手上路

积分 17
发帖 9
注册 2007-3-12
状态 离线
|
|
2007-3-31 17:39 |
|
|
vsda2008
初级用户
 
积分 34
发帖 15
注册 2007-3-25
状态 离线
|
|
2007-4-1 00:59 |
|
|
skywalker
初级用户
 
积分 75
发帖 26
注册 2007-4-1
状态 离线
|
『第 10 楼』:
使用 LLM 解释/回答一下
想学学dos啊,所以来了
Want to learn DOS, so I came here
|
|
2007-4-1 13:06 |
|
|
jamessjm
新手上路

积分 14
发帖 8
注册 2007-4-7
状态 离线
|
|
2007-4-7 23:56 |
|
|
netchxing
初级用户
 
积分 58
发帖 31
注册 2007-1-6 来自 重庆
状态 离线
|
|
2007-4-25 10:26 |
|