diff options
author | Simon Rettberg | 2020-06-02 14:24:54 +0200 |
---|---|---|
committer | Simon Rettberg | 2020-06-02 14:24:54 +0200 |
commit | f3323265685498207f1013de3bf22d193c37aa10 (patch) | |
tree | ae8790dc8cf273038dbf442b3f700d81b1ba8ca7 /io.h | |
parent | [build] Fix compilation with newer versions of gcc (diff) | |
parent | [import] Import version 5.31b (diff) | |
download | memtest86-pxe531b.tar.gz memtest86-pxe531b.tar.xz memtest86-pxe531b.zip |
Merge branch 'master' into pxe531bpxe531b
Diffstat (limited to 'io.h')
-rw-r--r-- | io.h | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -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 |