Releasing debian version 3:6.03+dfsg-10.
[syslinux-debian.git] / com32 / include / sys / io.h
blob96f8960e7295143f026cab8e204e0698b46d282d
1 #ifndef _SYS_IO_H
2 #define _SYS_IO_H
4 #include <inttypes.h>
6 static inline uint8_t inb(uint16_t p)
8 uint8_t v;
9 asm volatile ("inb %1,%0":"=a" (v):"Nd"(p));
10 return v;
13 static inline uint16_t inw(uint16_t p)
15 uint16_t v;
16 asm volatile ("inw %1,%0":"=a" (v):"Nd"(p));
17 return v;
20 static inline uint32_t inl(uint16_t p)
22 uint32_t v;
23 asm volatile ("inl %1,%0":"=a" (v):"Nd"(p));
24 return v;
27 static inline void outb(uint8_t v, uint16_t p)
29 asm volatile ("outb %0,%1"::"a" (v), "Nd"(p));
32 static inline void outw(uint16_t v, uint16_t p)
34 asm volatile ("outw %0,%1"::"a" (v), "Nd"(p));
37 static inline void outl(uint32_t v, uint16_t p)
39 asm volatile ("outl %0,%1"::"a" (v), "Nd"(p));
42 #endif /* _SYS_IO_H */