ANSI.SYS
Encyclopedia
ANSI.SYS is a device driver
Device driver
In computing, a device driver or software driver is a computer program allowing higher-level computer programs to interact with a hardware device....

 in the DOS
DOS
DOS, short for "Disk Operating System", is an acronym for several closely related operating systems that dominated the IBM PC compatible market between 1981 and 1995, or until about 2000 if one includes the partially DOS-based Microsoft Windows versions 95, 98, and Millennium Edition.Related...

 operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

 that provides extra console functions through ANSI escape sequence
ANSI escape code
ANSI escape sequences are characters embedded in the text used to control formatting, color, and other output options on video text terminals. Almost all terminal emulators designed to show text output from a remote computer, and to show text output from local software, interpret at least some of...

s. It is partially based upon a subset of the text terminal control standard proposed by the ANSI
American National Standards Institute
The American National Standards Institute is a private non-profit organization that oversees the development of voluntary consensus standards for products, services, processes, systems, and personnel in the United States. The organization also coordinates U.S. standards with international...

 X3L2 Technical Committee on Codes and Character Sets (the "X3 Committee").

Usage

To use ANSI.SYS under MS-DOS, a line is added to the CONFIG.SYS
CONFIG.SYS
CONFIG.SYS is the primary configuration file for the DOS, OS/2 as well as similar operating systems. It is a special file that contains setup or configuration instructions for the computer system.- Usage :...

 (or CONFIG.NT under Windows NT based versions of Windows) file that reads:

device=(drive:)(path)ANSI.SYS

where (drive:) and (path) are the drive letter
Drive letter assignment
Drive letter assignment is the process of assigning alphabetical identifiers to physical or logical disk drives or partitions in the root filesystem namespace; this usage is now mostly found in Microsoft operating systems...

 and path to the directory
Directory (file systems)
In computing, a folder, directory, catalog, or drawer, is a virtual container originally derived from an earlier Object-oriented programming concept by the same name within a digital file system, in which groups of computer files and other folders can be kept and organized.A typical file system may...

 in which the file ANSI.SYS is found.

Functionality

Once loaded, ANSI.SYS enabled code sequences that changed the colors of the cursor
Cursor (computers)
In computing, a cursor is an indicator used to show the position on a computer monitor or other display device that will respond to input from a text input or pointing device. The flashing text cursor may be referred to as a caret in some cases...

 and characters on the screen, or enabled software programs to move the cursor up or down lines, enabled blinking text, and similar text graphics features. Using this driver, text could be displayed in 16 different colors ("foreground" colors), with 8 optional background colors. It also allowed for the changing of the video mode from standard 80x25 text mode
Text mode
Text mode is a kind of computer display mode in which the content of the screen is internally represented in terms of characters rather than individual pixels. Typically, the screen consists of a uniform rectangular grid of character cells, each of which contains one of the characters of a...

 to a number of different graphics modes (for example, 320x200, 640x200, 40-column text mode) depending on which video graphics card was installed.

An interesting feature about ANSI.SYS was that it allowed for the remapping of any key on the keyboard
Computer keyboard
In computing, a keyboard is a typewriter-style keyboard, which uses an arrangement of buttons or keys, to act as mechanical levers or electronic switches...

 in order to perform shortcuts or macros for complex instructions. This feature was also used by evildoers to create simple trojan
Trojan horse (computing)
A Trojan horse, or Trojan, is software that appears to perform a desirable function for the user prior to run or install, but steals information or harms the system. The term is derived from the Trojan Horse story in Greek mythology.-Malware:A destructive program that masquerades as a benign...

s out of text files called "ANSI Bombs" laced with nefarious keyboard remaps. A number of antivirus utilities were written to ensure that, for example, the F3 function key
Function key
A function key is a key on a computer or terminal keyboard which can be programmed so as to cause an operating system command interpreter or application program to perform certain actions...

 wasn't remapped to DEL *.* or FORMAT C:
Disk formatting
Disk formatting is the process of preparing a hard disk drive or flexible disk medium for data storage. In some cases, the formatting operation may also create one or more new file systems...

and the N-key (for no) wasn't remapped to Y.

ANSI.SYS was extremely slow as it mapped to the BIOS calls. There were several replacements that directly mapped the video memory (similar to how most programs that did full-screen display worked on the IBM PC) that made console io useful. Typically these replacements also deleted the keyboard remapping functions and thus defused the "ANSI Bombs".

Occurrence

The file ANSI.SYS is a part of several Microsoft
Microsoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...

 operating systems, including:
  • MS-DOS
    MS-DOS
    MS-DOS is an operating system for x86-based personal computers. It was the most commonly used member of the DOS family of operating systems, and was the main operating system for IBM PC compatible personal computers during the 1980s to the mid 1990s, until it was gradually superseded by operating...

  • Windows 95
    Windows 95
    Windows 95 is a consumer-oriented graphical user interface-based operating system. It was released on August 24, 1995 by Microsoft, and was a significant progression from the company's previous Windows products...

  • Windows 98
    Windows 98
    Windows 98 is a graphical operating system by Microsoft. It is the second major release in the Windows 9x line of operating systems. It was released to manufacturing on 15 May 1998 and to retail on 25 June 1998. Windows 98 is the successor to Windows 95. Like its predecessor, it is a hybrid...

  • Windows NT
    Windows NT
    Windows NT is a family of operating systems produced by Microsoft, the first version of which was released in July 1993. It was a powerful high-level-language-based, processor-independent, multiprocessing, multiuser operating system with features comparable to Unix. It was intended to complement...

  • Windows 2000
    Windows 2000
    Windows 2000 is a line of operating systems produced by Microsoft for use on personal computers, business desktops, laptops, and servers. Windows 2000 was released to manufacturing on 15 December 1999 and launched to retail on 17 February 2000. It is the successor to Windows NT 4.0, and is the...

  • Windows XP
    Windows XP
    Windows XP is an operating system produced by Microsoft for use on personal computers, including home and business desktops, laptops and media centers. First released to computer manufacturers on August 24, 2001, it is the second most popular version of Windows, based on installed user base...

  • Windows Server 2003
    Windows Server 2003
    Windows Server 2003 is a server operating system produced by Microsoft, introduced on 24 April 2003. An updated version, Windows Server 2003 R2, was released to manufacturing on 6 December 2005...

     (x86 versions)
  • Windows Vista
    Windows Vista
    Windows Vista is an operating system released in several variations developed by Microsoft for use on personal computers, including home and business desktops, laptops, tablet PCs, and media center PCs...



ANSI.SYS was required to run some software that used its cursor and color control functions. It could also be used to enable elaborate color codes in the command.com
COMMAND.COM
COMMAND.COM is the filename of the default operating system shell for DOS operating systems and the default command line interpreter on Windows 95, Windows 98 and Windows Me...

 prompt. These uses were overshadowed by the use of ANSI.SYS in BBS
Bulletin board system
A Bulletin Board System, or BBS, is a computer system running software that allows users to connect and log in to the system using a terminal program. Once logged in, a user can perform functions such as uploading and downloading software and data, reading news and bulletins, and exchanging...

es; ANSI escape sequences were used to enable BBSes to send elaborate text graphics
ANSI art
ANSI art is a computer art form that was widely used at one time on BBSes. It is similar to ASCII art, but constructed from a larger set of 256 letters, numbers, and symbols — all codes found in IBM code page 437, often referred to as extended ASCII and used in MS-DOS and Unix environments...

 more elaborate than ASCII art
ASCII art
ASCII art is a graphic design technique that uses computers for presentation and consists of pictures pieced together from the 95 printable characters defined by the ASCII Standard from 1963 and ASCII compliant character sets with proprietary extended characters...

, and to control the cursor in ways that were used in a number of online game
Online game
An online game is a game played over some form of computer network. This almost always means the Internet or equivalent technology, but games have always used whatever technology was current: modems before the Internet, and hard wired terminals before modems...

s and similar features.

Features

There are some escape sequences specific to ANSI.SYS.
Sequence Effect
CSI = n h Set screen mode.
CSI = n l Reset screen mode
CSI code ; param [ ; param ] p Redefines a key.

Screen modes
Mode Description Mode Description
0 40 × 25 mono 1 40 × 25 color
2 80 × 25 mono 3 80 × 25 color
4 320 × 200 color 5 320 × 200 mono
6 640 × 200 mono 14 640 x 200 color (16-color graphics)
13 320 x 200 color (graphics) 19
Mode 13h
Mode 13h is the IBM VGA BIOS mode number for a specific standard 256 color mode on IBM's VGA graphics hardware. It features a resolution of 320×200 pixels and was used extensively in computer games and art/animation software of the late 1980s and early- to mid-1990s...

320 x 200 color (256-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)
7 Wrap at end of line

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK