summaryrefslogtreecommitdiff
path: root/kernel/x86/uart.S
blob: 416fad23542ee519a3f4fa8aefc1d283219c67ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
.section .text

.global outb
.global inb

# void outb(uint16_t port, uint8_t val)
outb:
    mov %dl, %al
    mov %cx, %dx
    outb %al, %dx
    ret

# uint8_t inb(uint16_t port)
inb:
    mov %cx, %dx
    inb %dx, %al
    ret