/*-----------------------------------------------------------------------------
 * * port.h (by damianf@wpi.edu)
 * Low level I/O functions taken from led-stat.txt
 * 
 * Dos part removed by M.
 *
 * Jan 22 95
 */

#ifndef PORT_H
#define PORT_H

static inline int port_in( int port )
{
   unsigned char value;
  __asm__ volatile ("inb %1,%0"
                    : "=a" (value)
                    : "d" ((unsigned short)port));
   return value;
}

static inline void port_out( unsigned short int port, unsigned char val ){
  __asm__ volatile (
                    "outb %0,%1\n"
                    :
                    : "a" (val), "d" (port)
                    );
}

#endif
