summaryrefslogtreecommitdiffstats
path: root/io.h
diff options
context:
space:
mode:
Diffstat (limited to 'io.h')
-rw-r--r--io.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/io.h b/io.h
index a38f92e..ae70dcf 100644
--- a/io.h
+++ b/io.h
@@ -116,3 +116,18 @@ __OUTS(l)
__inlc(port) : \
__inl(port))
#endif
+
+static __inline void
+outb_p (unsigned char __value, unsigned short int __port )
+{
+ __asm__ __volatile__ ("outb %b0,%w1\noutb %%al,$0x80": :"a" (__value),
+ "Nd" (__port));
+}
+
+static __inline unsigned char
+inb_p (unsigned short int __port)
+{
+ unsigned char _v;
+ __asm__ __volatile__ ("inb %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (__port));
+ return _v;
+} \ No newline at end of file