Command Prompt for Windows




ANSI Graphics Control Sequences

ANSI Control sequences are combinations of characters that can be used to control the cursor, screen and keyboard. The following ANSI Control sequences are supported by the WinOne® Command Prompt :-

Cursor Movement

ESC[HHome cursor.
ESC[<a>;<b>HMove cursor to <a>, <b>.
ESC[<a>;<b>fSame as for ESC[<a>;<b>H
ESC[<a>AMove cursor up <a> spaces.
ESC[<a>BMove cursor down <a> spaces.
ESC[<a>CMove cursor right <a> spaces.
ESC[<a>DMove cursor left <a> spaces.
ESC[sSave cursor position
ESC[uRestore cursor position

Screen Control

ESC[2JClear screen
ESC[KErase to end of line
ESC[<n>;...;<n>mActivate given attributes, where each <n> is
0 to 8Sequence is Ignored
3xFixed Foreground colour x
4x
where x is
0Black
1Red
2Green
3Yellow
4Blue
5Magenta
6Cyan
7White
Fixed Background colour x
5xSystem Foreground colour x
6x
where x is
0Background
1Error message
2Path and file name
3Number
4File Attribute
5File Date
6Bold Text
7Text
System Background colour x
ESC[=<n>hNOT Supported
ESC[=<n>lNOT Supported

Keyboard Control

ESC[<ns>;...;<ns>pNOT Supported

ANSI Control sequences can be entered via the PROMPT command, or by displaying a text file that already contains the codes using the TYPE command. ANSI Control sequences can NOT be entered at the command prompt.

Note:

The system foreground and background colours that are displayed depend on the Custom Colours and Colour Schemes set by the user.