xref: /minix3/minix/kernel/arch/i386/io_inb.S (revision 433d6423c39e34ec4b79c950597bb2d236f886be)
1*433d6423SLionel Sambuc/*	inb() - Input one byte				Author: Kees J. Bot */
2*433d6423SLionel Sambuc/*								18 Mar 1996 */
3*433d6423SLionel Sambuc/*	unsigned inb(U16_t port); */
4*433d6423SLionel Sambuc#include <machine/asm.h>
5*433d6423SLionel Sambuc
6*433d6423SLionel SambucENTRY(inb)
7*433d6423SLionel Sambuc	push	%ebp
8*433d6423SLionel Sambuc	movl	%esp, %ebp
9*433d6423SLionel Sambuc	movl	8(%ebp), %edx	/* port */
10*433d6423SLionel Sambuc	xorl	%eax, %eax
11*433d6423SLionel Sambuc	inb	%dx	/* read 1 byte */
12*433d6423SLionel Sambuc	pop	%ebp
13*433d6423SLionel Sambuc	ret
14