home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 328_01 / wegaclr.c < prev    next >
C/C++ Source or Header  |  1991-03-17  |  576b  |  35 lines

  1. /* wegaclr.c
  2.  *        detect whether an EGA monitor is connected to a color screen
  3.  */
  4.  
  5. #include  "wscreen.h"
  6. #include  "wsys.h"
  7.  
  8. #define ROM_EGA_DATA  *( (unsigned char far *)0x00000487L )
  9.  
  10. int w_ega_color(void)
  11.     {
  12.     unsigned char retcode = ON;
  13.  
  14.     switch ( wmonitor )
  15.         {
  16.         case ('E'):
  17.             if (0x20  & ROM_EGA_DATA)
  18.                 {
  19.                 retcode =OFF;
  20.                 } 
  21.  
  22.             break;
  23.         case ('H'):        /* fall thru for all monochrome adapters */
  24.         case ('M'):
  25.             retcode = OFF;
  26.             break;
  27.         }
  28.     return (retcode);
  29.     
  30.     }
  31.  
  32. /*----------------end WEGACLR.C -----------------------*/
  33.  
  34.  
  35.