/*............................... READPORT.C ................10-20-91.......*/ /* This program prompts the user for a hex i/o port address and then reads */ /* the port and displays the hex result. */ /*..........................................................................*/ main() { unsigned paddr,pdata; LOOP: printf("Input port address (hex): "); scanf("%x",&paddr); pdata = inp(paddr); printf("Port(%xh) = %xh\n",paddr,pdata); goto LOOP; return 0; }