⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 io.h

📁 一个微型操作系统源码
💻 H
字号:
/* * OSV * Copyright (C) 2002 Ciprian DOSOFTEI <rocksoul@mail.com> * All rights reserved. *  * http://backster.free.fr/osv * * This file is part of the OSV project. OSV is free software, also known as * "open source"; you can redistribute it and/or modify it under the terms  * of the GNU General Public License (GPL), version 2, as published by the Free * Software Foundation (FSF). To explore alternate licensing terms, contact  * the author at rocksoul@mail.com or +40740649907. *  * OSV is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE.  See the GPL for more details.  You should have * received a copy of the GPL along with OSV; see the file COPYING.  If * not, write to the FSF, 59 Temple Place #330, Boston, MA 02111-1307, USA. */ #include <asm/types.h>#define io_wait()   inb(0x80)#define inl(port) \({ dword _tmp__; \	asm volatile("inl %1, %0" : "=a" (_tmp__) : "d" ((word)(port))); \	_tmp__; })#define inportl(port) inl(port)#define inw(port) \({ word _tmp__; \	asm volatile(".byte 0x66; inl %1, %0" : "=a" (_tmp__) : "d" ((word)(port))); \	_tmp__; })#define inportw(port) inw(port)#define inb(port) \({ byte _tmp__; \	asm volatile("inb %1, %0" : "=a" (_tmp__) : "d" ((word)(port))); \	_tmp__; })#define inportb(port) inb(port)#define outl(port, val) \({ asm volatile("outl %0, %1" : : "a" ((dword)val) , "d" ((word)(port))); })#define outportl(port, val) outl(port, val)#define outw(port, val) \({asm volatile(".byte 0x66; outl %0, %1" : : "a" ((word)(val)) , "d" ((word)(port))); })#define outportw(port, val) outw(port, val)#define outb(port, val) \({ asm volatile("outb %0, %1" : : "a" ((byte)(val)) , "d" ((word)(port))); })#define outportb(port, val) outb(port, val)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -