/************************************************************************/ /* Using BIOS data area value at 0:0487H determine */ /* primary adapter and print the result. */ /************************************************************************/ print_data_primary() { char type; char far *p = 0; /* Declare far pointer */ type = p[0x487]; /* Fetch Equipment byte */ if (!(type & 0x08)) /* If EGA primary */ printf("\nEGA/VGA is primary"); else if (type & 0x02) /* If mono with EGA */ printf("\nCGA is primary"); else /* If color with EGA */ printf("\nMDA/Hercules is primary"); }