Nowiki::group    Graphics::''n''    Escape::color    Keyboard::dr-dos    Cursor::windows    -color::control

Features CSI (Control Sequence Introducer) is a placeholder for the common two-byte escape lead-in sequence "ESC [" (that is, 0x1B 0x5B). The ANSI standard also defines an alternative single-byte CSI code 0x9B, which is not supported by ANSI.SYS.

Standard DOS ANSI.SYS drivers support only the following sub-set of ANSI escape sequences:

Sequence Effect
ESC [ r A Cursor up (CUU)
ESC [ r B Cursor down (CUD)
ESC [ c C Cursor forward (CUF)
ESC [ c D Cursor back (CUB)
ESC [ r;c f Horizontal and vertical position (HVP)
ESC [ r;c H Cursor position (CUP)
ESC [ n J Erase display (ED) (n=0,2 or n=0,1,2)<ref group="nb" name="NB_MSDOS_ANSI_J">Arguments 0,1,2 are only supported and distinguished by Japanese versions of MS-DOS and PC DOS ANSI.SYS. Western issues of ANSI.SYS will not support or not distinguish between them. They are, however, also supported by Multiuser DOS.</ref>
ESC [ n K Erase in line (EL) (n=0 or n=0,1,2)<ref group="nb" name="NB_MSDOS_ANSI_J"/>
ESC [ n m Select graphic rendition (SGR) (n=0..47)
ESC [ 6 n Device status report (DSR) requests cursor position,
returned as cursor position report (CPR):
ESC [ r;c R
ESC [ s Save cursor position (SCP)
ESC [ u Restore cursor position (RCP)

There are also some escape sequences specific to the implementation of ANSI.SYS. They are not generally supported by ANSI consoles in other operating systems.

Sequence Effect
ESC [ n h
ESC [ ?n h
ESC [ =n h
ESC [ >n h<ref group="nb" name="NB_ANSI_J"/>
Set screen mode (SM)<ref group="nb" name="NB_ANSI_J">Lead-in prefix '>' is only supported in Japanese versions of MS-DOS, PC DOS and DR-DOS ANSI.SYS to access special Japanese display modes.</ref>
ESC [ n l
ESC [ ?n l
ESC [ =n l
ESC [ >n l<ref group="nb" name="NB_ANSI_J"/>
Reset screen mode (RM)<ref group="nb" name="NB_ANSI_J"/>
ESC [ n q Enable (n=1) or disable (n=0) /X support<ref group="nb" name="NB_MSDOS_X">This non-standard escape sequence is only supported by MS-DOS and PC DOS ANSI.SYS. It can be used to enable or disable extended keyboard support at runtime similar to the ANSI.SYS /X startup option.</ref>
ESC [ L Insert line (IL)<ref group="nb" name="NB_MSDOS_J">These non-standand escape sequences to insert and delete lines are only supported by Japanese versions of MS-DOS and PC DOS. They are also supported by Western issues of Multiuser DOS, but not by DR-DOS.</ref>
ESC [ M Delete line (DL)<ref group="nb" name="NB_MSDOS_J"/>
ESC $ ) 1 Switch keyboard input mode to Korean (Hangul)<ref group="nb" name="NB_ANSI_KOREAN">These non-standard escape sequences to switch between the Korean and English keyboard input modes are only supported by Korean versions of MS-DOS, PC DOS and DR-DOS ANSI.SYS.</ref>
ESC ( 2 Switch keyboard input mode to English<ref group="nb" name="NB_ANSI_KOREAN"/>
ESC [ + Enable console output<ref group="nb" name="NB_DRDOS_ANSI_X">These non-standard escape sequences to disable and reenable any output to the CON: device are supported by ANSI.SYS of DR-DOS 7.02 and higher only. They are used to mute the console output during boot, for example in conjunction with DR-WebSpyder boot floppies.</ref>
ESC [ - Disable console output<ref group="nb" name="NB_DRDOS_ANSI_X"/>
ESC [ a;b;... p Set key re-definement (SKR/KR)
Screen modes
Mode Description Mode Description
0 40 × 25 monochrome 1 40 × 25 color
2 80 × 25 monochrome 3 80 × 25 color
4 320 × 200 color 5 320 × 200 monochrome
6 640 × 200 monochrome
7 Wrap at end of line<ref group="nb" name="NB_SM-RM"/>
13 320 x 200 color (graphics) 14 640 x 200 color (16-color graphics)
15 640 x 350 monochrome (2-color graphics) 16 640 x 350 color (16-color graphics)
17 640 x 480 monochrome (2-color graphics) 18 640 x 480 color (16-color graphics)
19 320 x 200 color (256-color graphics)
114 640 x 480 color (16-color graphics)<ref group="nb" name="NB_DRDOS_ANSI_J">Video modes 114 and 115 are only supported by Japanese DOS/V issues of ANSI.SYS found in DR DOS 6.0, Novell DOS 7 and higher.</ref> 115 640 x 475 color (16-color graphics)<ref group="nb" name="NB_DRDOS_ANSI_J"/>

In some DOS implementations, video modes above 7 are not documented. Under Multiuser DOS, the only valid argument in conjunction with PCTERM is 7.

ANSI.SYS sections
Intro  Usage  Functionality  Occurrence  Features   Notes    References    See also    External links   

PREVIOUS: OccurrenceNEXT: Notes