2010-03-03 15:27:30 +01:00
|
|
|
/* inw() - Input one word Author: Kees J. Bot */
|
|
|
|
/* 18 Mar 1996 */
|
|
|
|
/* unsigned inw(U16_t port); */
|
2010-08-17 18:44:07 +02:00
|
|
|
#include <machine/asm.h>
|
2010-03-03 15:27:30 +01:00
|
|
|
|
2010-08-17 18:44:07 +02:00
|
|
|
ENTRY(inw)
|
2010-03-03 15:27:30 +01:00
|
|
|
push %ebp
|
|
|
|
movl %esp, %ebp
|
|
|
|
movl 8(%ebp), %edx /* port */
|
|
|
|
xorl %eax, %eax
|
|
|
|
inw %dx /* read 1 word */
|
|
|
|
pop %ebp
|
|
|
|
ret
|