blob: 6dbc27ca2ae8975b6f79ed9bbb81d2cb2f106c66 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
#ifndef _JOVE_PORT_H
#define _JOVE_PORT_H 1
#include <stdint.h>
static inline uint8_t inb(uint16_t port)
{ uint8_t r; __asm__ volatile("inb %w1, %b0": "=a"(r): "Nd"(port): "memory"); return r; }
static inline void outb(uint16_t port, uint8_t v)
{ __asm__ volatile("outb %b0, %w1":: "a"(v), "Nd"(port): "memory"); }
#endif
|