tape-kernel 1.0
a modular modern independent kernel
Loading...
Searching...
No Matches
io.s
Go to the documentation of this file.
1.section .text
2.code32
3
4.global __inb
5__inb:
6 pushl %ebp
7 movl %esp, %ebp
8 movl 8(%ebp), %edx #port
9 xorl %eax, %eax
10 inb %dx, %al
11 popl %ebp
12 ret
13
14.global __outb
15__outb:
16 pushl %ebp
17 movl %esp, %ebp
18 movl 8(%ebp), %edx #port
19 movl 12(%ebp), %eax #val
20 outb %al, %dx
21 popl %ebp
22 ret
23
24.global __inw
25__inw:
26 pushl %ebp
27 movl %esp, %ebp
28 movl 8(%ebp), %edx #port
29 xorl %eax, %eax
30 inw %dx, %ax
31 popl %ebp
32 ret
33
34.global __outw
35__outw:
36 pushl %ebp
37 movl %esp, %ebp
38 movl 8(%ebp), %edx #port
39 movl 12(%ebp), %eax #val
40 outw %ax, %dx
41 popl %ebp
42 ret
43
44
45 .global __reboot
46__reboot:
47 #keyboard controller reset method
48 mov $0x64, %dx #keyboard controller command port
49 mov $0xFE, %al #reset command
50 outb %al, %dx
51
52