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.
TextMode Procedure
  Summary Details Example                                   Back
 
  Argument
 
    mode    Integer expression representing the new display mode
 
  Description
 
    The TextMode procedure sets the display mode to the text mode
    represented by the argument.
 
    The Crt unit defines the possible choices of text mode values as
    constants.
 
    In addition, Crt defines several variables. TextMode modifies
    these variables in the following ways:
 
      Variable      Modification of Variable
      ════════      ═══════════════════════════════════════════════════
 
      DirectVideo   Sets state of direct memory access to True
      CheckSnow     Sets state of snow filtering to True for color
                    modes
      LastMode      Stores the current text mode
      TextAttr      Sets text attributes to attributes of the character
                    at the current cursor position
 
    Each TextMode call sets LastMode to the mode passed to TextMode. To
    save the current mode for later use, assign the value of LastMode
    to another variable. LastMode retains a text mode if a graphics
    mode is subsequently set. To restore the previous text mode after
    being in a graphics mode:
 
       TextMode( LastMode );
 
    LastMode stores the 43- or 50-line mode value in the high-order
    byte. To switch to this mode, add Font8x8 to the constant for the
    desired text mode:
 
       TextMode( CO80 + Font8x8 );
 
    To switch to 43- or 50-line mode from the current mode:
 
       TextMode( Lo( LastMode ) + Font8x8 );
 
    To switch to 25-line mode:
 
       TextMode( Lo( LastMode ) );
 
    To toggle between the two:
 
       TextMode( LastMode XOR Font8x8 );