/* this program detects the installation of COM2 and reports the I/O port address assigned to it. */ #include #include main() { unsigned int far *xptr; /* a far pointer */ xptr=(unsigned int far *) 0x00000402; /* assign address */ if(*xptr >0) printf("I/O base address assigned to COM2 is %X \n",*xptr); else printf("COM2 = None found"); }