Text mode

From Free net encyclopedia

A text mode program communicates with the user by only displaying text and possibly a limited set of predefined semi-graphical characters, which allow the drawing of rudimentary boxes around portions of text, either to highlight the content or to simulate widget or control interface objects found in GUI programs.

An important characteristic of text mode programs is that they assume constant width fonts, where every character has the same width on screen, which allows to easily maintain the vertical alignment when displaying semi-graphical characters. A text mode is implemented with a screen buffer that contains the matrix of characters and their attributes. This buffer is converted by the video controller into a video signal.

Depending on the environment, the screen buffer can be directly addressable. Programs that display output on remote video terminals must issue special control sequences to manipulate the screen buffer. The most popular standards for such control sequences are ANSI and VT100.

Programs accessing the screen buffer through control sequences may lose synchronization with the actual display, and so many text mode programs have a redisplay everything command, often associated with the Ctrl-L key combination.

The border between text mode and graphical programs can sometimes be fuzzy, especially on the PC's VGA hardware, because many later text mode programs tried to push the model to the extreme by playing with the video controller. For example, they redefined the character set in order to create custom semi-graphical characters, or even created the appearance of a graphical mouse by redefining the appearance of the characters over which the mouse was shown at a given time.

Many modern programs with a graphical interface simulate the display style of text mode programs, notably when it is important to preserve the vertical alignment of text, e.g., during computer programming.  There exist also software components to emulate text mode, such as terminal emulators or Win32 consoles.

PC Common Text Modes

Depending on the graphics adapter used, a variety of text modes are available on x86 personal computers. They are listed on the table below:

Text Res.  Graphics Res.   Description  Adapters  
--------------------------------------------------
  40x25      -------        B&W Text      CGA+     
  40x25      -------        Color Text    CGA+        
  40x25      320x200        4 colors      CGA+        
  40x25      320x200        2 colors      CGA+        
  80x25      640x200        2 colors      CGA+        
  40x25      320x200       16 colors      EGA+    
  80x25      640x200       16 colors      EGA+        
  80x25      640x350        2 colors      EGA+        
  80x25      640x350       16 colors      EGA+        
  80x43      640x350       16 colors      EGA+
  80x25      640x480        2 colors      VGA+    
  80x25      640x480       16 colors      VGA+       
  40x25      320x200      256 colors      VGA+
  80x50      640x480       16 colores     VGA+
  

By far the most common text mode used in DOS environments, and initial Windows consoles, is the default 80 columns by 25 rows, or 80x25, with 16 colors. This mode was available on practically all IBM and compatible personal computers. All 80x25 modes also had a virtual 80x24 mode, used by some applications that needed a status bar on the last row, like terminal emulators. In reality, it was the same 80x25 mode, but restrained by software to make the last row unaccesible.

Two other text modes, 80x43 and 80x50, were also available, but were very rarely used. The 40 column text modes were never very popular, and were used only for demonstration purposes or with very old hardware.

See also

fr:mode texte pl:tryb tekstowy