source: trunk/minix/lib/i86/misc/io_inl.s@ 9

Last change on this file since 9 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 351 bytes
Line 
1! inl() - Input one dword Author: Kees J. Bot
2! 18 Mar 1996
3! unsigned inl(U16_t port);
4
5 o32 = 0x66
6
7.sect .text
8.define _inl
9_inl:
10 push bp
11 mov bp, sp
12 pushf
13 cli ! eax is not interrupt safe
14 mov dx, 4(bp) ! port
15 .data1 o32
16 in dx ! read 1 dword
17 .data1 o32
18 push ax ! push eax
19 pop ax
20 pop dx ! dx:ax = eax
21 popf
22 pop bp
23 ret
Note: See TracBrowser for help on using the repository browser.