initial commit
[pfinal.git] / Routix / src / io.c
blobf08eb321e5845f1addb8050d0119e6b6324a193a
1 /* io.c */
3 #include "routix/system.h"
6 unsigned char inportb(word puerto )
8 unsigned char valor;
10 __asm__ __volatile__("inb %w1,%b0" : "=a" (valor) : "d" (puerto) );
11 return valor;
14 void outportb (word puerto, unsigned char dato)
16 __asm__ __volatile__("outb %b0,%w1" : : "a" (dato), "d" (puerto) );
21 unsigned char inportb_p(word puerto )
23 unsigned char valor;
25 __asm__ __volatile__("inb %w1,%b0\n\tnop" : "=a" (valor) : "d" (puerto) );
26 return valor;
29 void outportb_p (word puerto, unsigned char dato)
31 __asm__ __volatile__("outb %b0,%w1\n\tnop" : : "a" (dato), "d" (puerto) );