Skip to content

Commit 08d01f3

Browse files
committed
Fix: Garbage at higher bytes of IRR, ISR
1 parent e6f3846 commit 08d01f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/x86/io.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include <types.h>
1818

1919
#define outb(p,v) __asm__ volatile ("out dx, al;" : :"a" (v), "d" (p))
20-
#define inb(p,v) __asm__ volatile ("in al, dx" :"=a" (v) :"d" (p))
20+
#define inb(p,v) __asm__ volatile ("xor %0, %0; in al, dx" :"=a" (v) :"d" (p))
2121
// Reference: https://wiki.osdev.org/Inline_Assembly/Examples#IO_WAIT
2222
#define io_delay() outb(0x80, 0)
2323

0 commit comments

Comments
 (0)