summaryrefslogtreecommitdiffstats
path: root/kernel/io_ports.asm
blob: 9ab47d983e7f631cf9f34a81c941fc1e707c889e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
SECTION .text
global outw
global inw

outw:
    push ebp;
    mov ebp,esp

    mov dx, [ebp+8]     ; port
    mov ax, [ebp+12]    ; data
    out dx, ax

    mov esp,ebp
    pop ebp
    ret


inw:
    push ebp;
    mov ebp,esp

    mov dx, [ebp+8]     ; port
    in eax, dx

    mov esp,ebp
    pop ebp
    ret