NetcanOS
Netcan OS is an operation system for x86 PCs, for learning how os works.
|
宏定义 | |
#define | ASSERT(cond, msg) if(!(cond)) { printf("%s at %s:%d\n", msg, __FILE__, __LINE__); while(1); } |
类型定义 | |
typedef unsigned int | u32 |
typedef signed int | s32 |
typedef unsigned short | u16 |
typedef signed short | s16 |
typedef unsigned char | u8 |
typedef signed char | s8 |
函数 | |
u8 | port_byte_in (u16 port) |
从IO端口读取8位数据。 更多... | |
u16 | port_word_in (u16 port) |
从IO端口读取16位数据。 更多... | |
void | port_byte_out (u16 port, u8 data) |
从IO端口写入8位数据。 更多... | |
void | port_word_out (u16 port, u16 data) |
从IO端口写入16位数据。 更多... | |
#define ASSERT | ( | cond, | |
msg | |||
) | if(!(cond)) { printf("%s at %s:%d\n", msg, __FILE__, __LINE__); while(1); } |
typedef signed short s16 |
typedef signed int s32 |
typedef signed char s8 |
typedef unsigned short u16 |
typedef unsigned int u32 |
typedef unsigned char u8 |
从IO端口读取8位数据。
port | 端口 |
__asm__是ansi标准自带的 asm [volatile] ( AssemblerTemplate : OutputOperands // 输出寄存器的值到变量 [ : InputOperands // 输入变量的值到寄存器 [ : Clobbers ] ])