Int 2Fh / 1A00h         Get ANSI.SYS Installed State                 DOS 4.0+

Determines whether the ANSI.SYS device driver has been loaded.

Entry AX = 1A00h

Return AL = 0FFh | 00h ANSI.SYS loaded | not loaded

──────────────────────────────────────────────────────────────────

ANSI Escape Sequences

ANSI escape sequences affect output to the screen device, giving
programs control of the screen's cursor, colors, and display
modes. (An escape sequence is one or more characters preceded by
the escape character ASCII 1Bh.) When a program writes an escape
sequence to the screen, the screen device translates the sequence
into its corresponding action, such as positioning the cursor or
changing colors.

The following list summarizes the ANSI escape sequences supported
by the ANSI.SYS driver. ANSI escape sequences are available only
if this driver has been installed. Parameters shown in underline
are ASCII strings representing integers.

Escape sequence Action
ESC[2J Clears the entire screen and moves the cursor
to upper-left corner (home).
ESC[K Clears the screen from cursor to end of line.
ESC[rowsA Moves the cursor up the specified number of
rows without changing the column (one row if
rows omitted). Ignored if cursor already
at top row.
ESC[rowsB Moves the cursor down the specified number of
rows without changing the column (one row if
rows omitted). Ignored if cursor already
at bottom row.
ESC[colsC Moves the cursor to the right the specified
number of columns without changing the row
(one column if cols omitted). Ignored if
cursor already at rightmost column.
ESC[colsD Moves the cursor to the left the specified
number of columns without changing the row
(one column if cols omitted). Ignored if
cursor already at leftmost column.
ESC[row;colH Moves the cursor to an absolute position, e.g.
ESC[25;80H moves the cursor to the lower-right
corner on an 80x25 screen. Either row or col
can be omitted.
ESC[s Saves the current cursor position.
ESC[u Moves the cursor to the position most recently
saved by ESC[s.
ESC[6n Returns the current cursor position in the
format ESC[row;colR. A program should read the
cursor position from standard input immediately
after writing the escape sequence.
ESC[attrm Selects from the character attributes and
colors in Table 1. If more than one attribute
or color is specified, values are separated by
semicolons. The ability to display certain
attributes and colors depends on the screen
device.
ESC[=modeh Selects on of the display modes in Table 2.
ESC[=7l Disables line wrap.


Table 1 - Character attributes and colors
Value Attribute
0 No special attributes
1 High intensity
2 Low intensity
3 Italic
4 Underline (on monochrome display adapter only)
5 Blinking
6 Rapid blinking
7 Reverse video
8 Invisible (doesn't display)
Foreground Background
value value Color
30 40 Black
31 41 Red
32 42 Green
33 43 Yellow
34 44 Blue
35 45 Magenta
36 46 Cyan
37 47 White


Table 2 - Display modes
Value Mode
0 40 columns by 25 rows, 16-color text (color burst off)
1 40 columns by 25 rows, 16-color text
2 80 columns by 25 rows, 16-color text (color burst off)
3 80 columns by 25 rows, 16-color text
4 320 pixels by 200 pixels, 4-color graphics
5 320 pixels by 200 pixels, 4-color graphics (color burst off)
6 640 pixels by 200 pixels, 2-color graphics
7 Enables line wrapping
14 640 pixels by 200 pixels, 16-color graphics (EGA/VGA)
15 640 pixels by 350 pixels, 2-color graphics (EGA/VGA)
16 640 pixels by 350 pixels, 16-color graphics (EGA/VGA)
17 640 pixels by 480 pixels, 2-color graphics (MCGA/VGA)
18 640 pixels by 480 pixels, 16-color graphics (VGA)
19 320 pixels by 200 pixels, 256-color graphics (MCGA/VGA)
Note: Modes 14-19 supported by DOS 4.0+