iopl.c

来自「C++ 编写的EROS RTOS」· C语言 代码 · 共 24 行

C
24
字号
/* Sample small program: the obligatory ``hello world'' demo. */#include <eros/target.h>#include <eros/i486/io.h>#include <domain/domdbg.h>#define KR_SELF     2#define KR_OSTREAM  3#define KR_BANK     4intmain(void){  kprintf(KR_OSTREAM, "IOPL: About to issue IO instruction\n");  /* Writing anything to port 0x80 is a no-op, so this should be   * safe. */  out8(0x5, 0x80);  kprintf(KR_OSTREAM, "IOPL: Success (no GP fault)\n");  return 0;}

⌨️ 快捷键说明

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