qp.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
TextAttr
  Crt Unit Contents Index                                   Back
 
  VAR
      TextAttr : Byte;    { current text attribute }
 
  Unit:     Crt
 
  Context:  HighVideo, LowVideo, TextBackground, TextColor
 
  Description
 
    TextAttr holds the current settings for foreground and background
    colors and the state of blinking.
 
    The current foreground color is held in bits 0-3; the possible
    values are in the range 0..15. The current background color is held
    in bits 4-6; the possible values are in the range 0..7. Bit 7
    enables blinking if set.
 
    Crt defines the possible colors as constants that can be passed to
    the TextBackground and TextColor procedures.
 
    Directly assigning a new value to TextAttr is faster than using
    TextBackground and TextColor. The constants can be used, but a
    setting for background color must be multiplied by 16 to be placed
    in the correct bits. No multiplication is necessary to add in the
    Blink constant.