home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l200 / 6.ddi / LIB / WAIT.C < prev   
Encoding:
C/C++ Source or Header  |  1986-08-21  |  330 b   |  21 lines

  1. /*    WAIT(port, mask, x) -- wait for bit pattern in port
  2.  
  3.         Copyright (c) 1983, 1984  by  JMI Software Consultants, Inc.
  4.  */
  5.  
  6. #include "acom.h"
  7.  
  8. VOID WAIT(port, mask, x)
  9.     BYTES port;
  10.     INT mask, x;
  11.     {
  12.     if (port == -1)
  13.         port = 0;
  14.     if (x == -1)
  15.         x = 0;
  16.     x &= 0xff;
  17.     while (((inp(port) ^ x) & mask) == 0)
  18.         ;
  19.     }
  20.  
  21.