00001
00002
00003 #include "routix/system.h"
00004
00005
00006 unsigned char inportb(word puerto )
00007 {
00008 unsigned char valor;
00009
00010 __asm__ __volatile__("inb %w1,%b0" : "=a" (valor) : "d" (puerto) );
00011 return valor;
00012 }
00013
00014 void outportb (word puerto, unsigned char dato)
00015 {
00016 __asm__ __volatile__("outb %b0,%w1" : : "a" (dato), "d" (puerto) );
00017 }
00018
00019
00020
00021 unsigned char inportb_p(word puerto )
00022 {
00023 unsigned char valor;
00024
00025 __asm__ __volatile__("inb %w1,%b0\n\tnop" : "=a" (valor) : "d" (puerto) );
00026 return valor;
00027 }
00028
00029 void outportb_p (word puerto, unsigned char dato)
00030 {
00031 __asm__ __volatile__("outb %b0,%w1\n\tnop" : : "a" (dato), "d" (puerto) );
00032 }