3 * Copyright (c) 2001, David H. Hovemeyer <daveho@cs.umd.edu>
6 * This is free software. You are permitted to use,
7 * redistribute, and modify it as specified in the file "COPYING".
10 #include <geekos/io.h>
13 * Write a byte to an I/O port.
15 void Out_Byte(ushort_t port, uchar_t value)
17 __asm__ __volatile__ (
20 : "a" (value), "Nd" (port)
25 * Read a byte from an I/O port.
27 uchar_t In_Byte(ushort_t port)
31 __asm__ __volatile__ (
41 * Write a word to an I/O port.
43 void Out_Word(ushort_t port, ushort_t value)
45 __asm__ __volatile__ (
48 : "a" (value), "Nd" (port)
53 * Read a word from an I/O port.
55 ushort_t In_Word(ushort_t port)
59 __asm__ __volatile__ (
69 * Write a double word to an I/O port.
71 void Out_DWord(ushort_t port, uint_t value)
73 __asm__ __volatile__ (
76 : "a" (value), "Nd" (port)
81 * Read a double word from an I/O port.
83 uint_t In_DWord(ushort_t port)
87 __asm__ __volatile__ (
97 * Short delay. May be needed when talking to some
103 __asm__ __volatile__ (