{--------------------------------------------------------------}
{                            WHICH                             }
{                                                              }
{        Display adpater detction demonstration program        }
{                                                              }
{                             by Jeff Duntemann                }
{                             Turbo Pascal V3.0                }
{                             Last update 1/31/86              }
{                                                              }
{    From the book, COMPLETE TURBO PASCAL, by Jeff Duntemann   }
{    Scott, Foresman & Co. (c) 1986,1987  ISBN 0-673-18600-8   }
{--------------------------------------------------------------}

PROGRAM WhichDisplay;  { For the IBM PC! }

TYPE
  BytePtr = ^Byte;

VAR
  BP : BytePtr;
  B  : Byte;

BEGIN
  BP := Ptr($0030,$0410); { Address of equipment flag byte }
  B  := BP^;
  IF (B AND $30) = $30 THEN Writeln('Monochrome display installed!')
    ELSE Writeln('Color graphics adapter installed!')
END.
