kio.c

00001 /***************************************************************************
00002                           kio.c  -  description
00003                              -------------------
00004     begin                : Sat Dec 13 2003
00005     copyright            : (C) 2003 by Dynacube Team
00006     email                : mdshah82@yahoo.com
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #include "core/kmaster.h"
00019  
00020   DB inb(DW port)
00021   {
00022     DB data;
00023     __asm__ ("inb %1, %0":"=a"(data):"d"(port));
00024     return data;
00025   }
00026 
00027   DW inw(DW port)
00028   {
00029     DW data;
00030     __asm__ ("inw %1, %0":"=a"(data):"d"(port));
00031     return data;
00032   }
00033   
00034   void outb(DW port, DB data)
00035   {
00036     __asm__ ("outb %1, %0"::"d"(port),"a"(data));
00037   }
00038 
00039   void outw(DW port, DW data)
00040   {
00041     __asm__ ("outw %1, %0"::"d"(port),"a"(data));
00042   }

Generated on Thu Jul 27 23:52:26 2006 for Dynacube by  doxygen 1.4.7