home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / Samples / C-ASM_VI.ARJ / PROGC.ZIP / PROGC031.C < prev    next >
Text File  |  1988-05-25  |  904b  |  19 lines

  1.  
  2. /************************************************************************/
  3. /* Using BIOS data area value at 0:0487H determine                      */
  4. /* primary adapter and print the result.                                */
  5. /************************************************************************/
  6.  
  7. print_data_primary()
  8.         {
  9.         char    type;
  10.         char    far     *p = 0;                 /* Declare far pointer  */
  11.         type = p[0x487];                        /* Fetch Equipment byte */
  12.         if (!(type & 0x08))                     /* If EGA primary       */
  13.                 printf("\nEGA/VGA is primary");
  14.         else if (type & 0x02)                   /* If mono with EGA     */
  15.                 printf("\nCGA is primary");
  16.         else                                    /* If color with EGA    */
  17.                 printf("\nMDA/Hercules is primary");
  18.         }
  19.