ANSI.SYS Ü
ßßßßßßßßß
Defines functions that change display graphics, control cursor movement,
and reassign keys. The ANSI.SYS device driver supports the use of ANSI
escape sequences to control the system's screen and keyboard.
Syntax: DEVICE=[drive:][path]ansi.sys [/X] [/K]
[drive:][path]
Specifies the location of the ANSI.SYS file.
/X Remaps extended keys independtly on 101-key keyboards.
/K Ignores extended keys on 101-key keyboards.
Parameters used in ANSI escape sequences
Pn Numeric paramter. Specifies a decimal number.
Ps Selective parameter. Specifies a decimal number that you use to
select a function. You can specify more than one function by
separating the parameters with semicolons.
PL Line parameter. Specifies a decimal number that represents one of
the lines on your display or on another device.
Pc Column parameter. Specifies a decimal number that represents one
of the columns on your screen or on another device.
ANSI escape sequences
In the following list of ANSI escape sequences, the abbreviate ESC
represents the ASCII escape character 27 (1Bh), which appears at the
beginning of each escape sequence.
ESC[PL;PcH or ESC[PL;Pcf
Cursor Position. Moves the cursor to the specified location
(coordinates). If you do not specify a position, the cursor moves
to the home position (home 0, column 0).
ESC[PnA
Cursor Up. Moves the cursor up by the specified number of lines
without changing columns.
ESC[PnB
Cursor Down. Moves the cursor down by the sepcified number of lines
without changing columns.
ESC[PnC
Cursor Forward. Moves the cursor forward by the specified number of
columns without changing lines.
ESC[PnD
Cursor Backward. Moves the cursor back by the specified number of
columns without changing lines.
ESC[s
Save Cursor Position. Saves the current position. You can move the
cursor to the saved cursor position by using the Restore Cursor
Position sequence.
ESC[u
Restore Cursor Position. Returns the cursor to the position saved by
the Save Cursor Position sequence.
ESC[2J
Erase Display. Clears the screen and moves the cursor to the home
position (line 0, column 0).
ESC[K
Erase Line. Clears all characters from the cursor position to the
end of the line.
ESC[Ps;...;Psm
Set Graphics Mode. Calls the graphics functions specified by the
following values. These functions remain active until the next
occurrence of this escape sequence.
Text attributes
0 All attributes off
1 Bold on
4 Underscore (on monochrome display adapter only)
5 Blink on
7 Reverse video on
8 Concealed on
Foreground colors
30 Black
31 Red
32 Green
33 Yellow
34 Blue
35 Magenta
36 Cyan
37 White
Background colors
40 Black
41 Red
42 Green
43 Yellow
44 Blue
45 Magenta
46 Cyan
47 White
Parameters 30 through 47 meet the ISO 6429 standard.
ESC[=Psh
Set Mode. Changes the screen width or type to the mode specified
by one of the following values:
0 40x25 monochrome (text)
1 40x25 color (text)
2 80x25 monochrome (text)
3 80x25 color (text)
4 320x200 4-color (graphics)
5 320x200 monochrome (graphics)
6 640x200 monochrome (graphics)
7 Enables line wrapping
13 320x200 color (graphics)
14 640x200 color (16-color graphics)
15 640x350 monochrome (2-color graphics)
16 640x350 color (16-color graphics)
17 640x480 monochrome (2-color graphics)
18 640x480 color (16-color graphics)
19 320x200 color (256-color graphics)
ESC[Psl
Reset Mode. Resets the mode by using the same values that Set Mode
uses, except for 7, which disables line wrapping.
Examples:
To exchange backslash and question-mark keys by using literal strings,
type the following sequence:
ESC["\";"?"pESC["?";"\"p
To exchange the backslash and question-mark keys by using each key's
ASCII value, type the following escape sequence:
ESC[92;63pESC[63;92p
To restore the backslash and question-mark keys to their original
meanings, type the following sequence:
ESC[92;92pESC[63;63p