minix/kernel/arch/i386/io_inw.S
Arun Thomas 9a21d1a2fd Macros for symbols used in both ASM and C
-The macros take care of prepending the leading underscore when
 necessary.
2010-08-17 16:44:07 +00:00

13 lines
264 B
ArmAsm

/* inw() - Input one word Author: Kees J. Bot */
/* 18 Mar 1996 */
/* unsigned inw(U16_t port); */
#include <machine/asm.h>
ENTRY(inw)
push %ebp
movl %esp, %ebp
movl 8(%ebp), %edx /* port */
xorl %eax, %eax
inw %dx /* read 1 word */
pop %ebp
ret