x86.h
来自「一个类linux的dos下开发的操作系统.」· C头文件 代码 · 共 40 行
H
40 行
#ifndef _TL_X86_H
#define _TL_X86_H
#ifdef __cplusplus
extern "C"
{
#endif /* def __cplusplus */
#include <_size_t.h>
#define outport(P,V) outportw(P,V)
#define inport(P) inportw(P)
/* these first four aren't x86-specific. I may move them elsewhere */
unsigned critb(void);
void crite(unsigned flags);
void disable(void);
void enable(void);
void fmemsetw(unsigned short sel, unsigned long off, unsigned short val,
size_t count);
unsigned char inportb(unsigned short port);
void outportb(unsigned short port, unsigned char val);
unsigned char peekb(unsigned short sel, unsigned long off);
void pokeb(unsigned short sel, unsigned long off, unsigned char val);
void pokew(unsigned short sel, unsigned long off, unsigned short val);
unsigned long peekl(unsigned short sel, unsigned long off);
void pokel(unsigned short sel, unsigned long off, unsigned long val);
#ifdef __cplusplus
}
#endif /* def __cplusplus */
#endif /* ifndef _TL_X86_H */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?