发信人: dragon (飞龙在天), 信区: ASCIIart
标 题: ANSI控制码解说
发信站: BBS 水木清华站 (Wed Jan 15 13:31:57 1997)
清华BBS支持ANSI/3.64控制码标准,ANSI控制码均以 Esc[ 作为控制码的
开始标志,清华BBS中ESC字符的输入方法是[ESC]+[ESC],在编辑器中用
"*"代表。DOS支持大部分ANSI控制码,在DOS下使用请看 c:>help ansi.sys。
下面先介绍DOS支持的部分ANSI控制码。
DEVICE=ANSI.SYS
设置显示属性
*[0m 关闭所有属性
*[1m 设置高亮度
*[4m 下划线(仅限单显 )
*[5m 闪烁
*[7m 反显
*[8m 消隐
*[30m ---- *[37m 设置前景色
*[40m ---- *[47m 设置背景色
注:*[Ps;...;Psm 参数Ps可连续设置
光标控制
*[nA 光标上移n行
*[nB 光标下移n行
*[nC 光标右移n行
*[nD 光标左移n行
*[y;xH设置光标位置
*[2J 清屏
*[K 清除从光标到行尾的内容
*[s 保存光标位置
*[u 恢复光标位置
注意: 控制符大小写
请到 Test 板试验这些控制码的用法
文章贴到板上后,请先看一下实际效果,可以按"E"重新编辑修改。
清华BBS支持ANSI/3.64控制码标准,ANSI控制码均以 Esc[ 作为控制码的
开始标志,清华BBS中ESC字符的输入方法是[ESC]+[ESC],在编辑器中用
"*"代表。DOS支持大部分ANSI控制码,在DOS下使用请看 c:>help ansi.sys。
下面介绍DOS不支持的部分ANSI控制码。
^^^^^^
光标控制(2)
*[y;xf 设置光标位置(现已很少使用)
*[nL 在光标行前插入n行 (NANSI)
*[nM 删除包括光标行在内的n行 (NANSI)
*[n@ 在光标处插入n个空白字符 (NANSI)
*[nP 删除包括光标位置在内的n个字符 (NANSI)
注:全部ANSI/3.64控制码标准见文章“ANSI/3.64”
做活动签名档就要掌握ANSI光标控制码,原理和动画制作一样。
签名档有六行的行数限制,清华BBS目前的每行字符限制在240左右,
签名档有六行的行数限制,清华BBS目前的每行字符限制在240左右,
因而一个签名档总共可使用大约1320个字符。
ps.本篇原始作者为前板主kp.
--
※ 修改:·unknown 於 Jul 16 15:27:19 修改本文·[FROM: 10.64.5.133]
※ 来源:·日月光华站 bbs.fudan.edu.cn·[FROM: 10.64.5.40]
Sender: dragon 飞龙zaitian , message area: ASCIIart
Title: ANSI control code explanation
Sending station: BBS Shuimu Tsinghua Station Wed Jan 15 13:31:57 1997
Tsinghua BBS supports the ANSI 3.64 control code standard. All ANSI control codes use Esc[ as the control code.
Start mark The input method of ESC character in Tsinghua BBS is [ESC] [ESC] Use in the editor
"*" means DOS supports most ANSI control codes. For use under DOS, please see c:>help ansi.sys
The following first introduces some ANSI control codes supported by DOS.
DEVICE ANSI.SYS
Set display properties
*[0m turn off all attributes
*[1m Set high brightness
*[4m underline single display only
*[5m flash
*[7m reverse display
*[8m blanking
*[30m *[37m Set the foreground color
*[40m *[47m Set background color
Note *[Ps;...;Psm parameter Ps can be set continuously
Cursor control
*[nA Move the cursor up n lines
*[nB Move the cursor down n lines
*[nC Move cursor n lines to the right
*[nD Move cursor left n lines
*[y;xH sets the cursor position
*[2J Clear screen
*[K clears the contents from the cursor to the end of the line
*[s save cursor position
*[u restore cursor position
Note: Control character case
Please go to the Test board to test the usage of these control codes.
After posting the article to the board, please take a look at the actual effect. You can press "E" to re-edit and modify it.
Tsinghua BBS supports the ANSI 3.64 control code standard. All ANSI control codes use Esc[ as the control code.
Start mark The input method of ESC character in Tsinghua BBS is [ESC] [ESC] Use in the editor
"*" means DOS supports most ANSI control codes. For use under DOS, please see c:>help ansi.sys
The following introduces some ANSI control codes that are not supported by DOS.
^^^^^^
Cursor control 2
*[y;xf sets the cursor position and is now rarely used
*[nL Insert n lines before the cursor line NANSI
*[nM Delete n lines including the cursor line NANSI
*[n@ Insert n blank characters at the cursor NANSI
*[nP delete n characters including cursor position NANSI
NOTE For complete ANSI 3.64 control code standards, see the article ANSI 3.64
To make an event signature file, you need to master the ANSI cursor control code. The principle is the same as that of animation production.
The signature file has a limit of six lines. Tsinghua BBS currently has a character limit of about 240 characters per line.
The signature file has a limit of six lines. Tsinghua BBS currently has a character limit of about 240 characters per line.
Therefore, a total of approximately 1320 characters can be used in a signature file.
ps. The original author of this article is the former board owner kp.
Modification: unknown modified this article on Jul 16 15:27:19 [FROM: 10.64.5.133]
Source: Sun and Moon Guanghua Station bbs.fudan.edu.cn [FROM: 10.64.5.40]