|
NetcanOS
Netcan OS is an operation system for x86 PCs, for learning how os works.
|
#include <io.h>宏定义 | |
| #define | VRAM_ADDRESS 0xb8000 |
| 显存地址 更多... | |
| #define | MAX_ROW 25 |
| 机器启动后,图像硬件初始为VGA文本模式(另一种模式为图像模式),能显示80x25个字符,用2个字节表示一个字符。 更多... | |
| #define | MAX_COL 80 |
| #define | WHITE_ON_BLACK 0x0f |
| 黑底白字 更多... | |
| #define | REG_SCREEN_CTRL 0x3d4 |
| 屏幕设备的IO端口。 更多... | |
| #define | REG_SCREEN_DATA 0x3d5 |
| 屏幕数据端口 更多... | |
| #define | TABSIZE 8 |
| TAB制表符的长度 更多... | |
函数 | |
| void | clear_vt (void) |
| 清屏。 更多... | |
| void | print_char (char character, int row, int col, char attribute_byte) |
| 在第row行,第col列打印属性为attribute_byte的字符character,打印函数中的最底层。 更多... | |
| void | print_at (const char *string, int row, int col) |
| 在第row行,第col列打印字符串。 更多... | |
| void | print (const char *string) |
| 在当前行打印字符串。 更多... | |
变量 | |
| u8 *const | VRAM |
| #define MAX_COL 80 |
| #define MAX_ROW 25 |
机器启动后,图像硬件初始为VGA文本模式(另一种模式为图像模式),能显示80x25个字符,用2个字节表示一个字符。
| #define REG_SCREEN_CTRL 0x3d4 |
屏幕设备的IO端口。
| #define REG_SCREEN_DATA 0x3d5 |
屏幕数据端口
| #define TABSIZE 8 |
TAB制表符的长度
| #define VRAM_ADDRESS 0xb8000 |
显存地址
| #define WHITE_ON_BLACK 0x0f |
黑底白字
| void clear_vt | ( | void | ) |
清屏。
| void print | ( | const char * | string | ) |
在当前行打印字符串。
| string | 字符串 |
| void print_at | ( | const char * | string, |
| int | row, | ||
| int | col | ||
| ) |
在第row行,第col列打印字符串。
| string | 字符串 |
| row | 行数 |
| col | 列数 |
| void print_char | ( | char | character, |
| int | row, | ||
| int | col, | ||
| char | attribute_byte | ||
| ) |
在第row行,第col列打印属性为attribute_byte的字符character,打印函数中的最底层。
| character | 8位ASCII字符 |
| row | 行数 |
| col | 列数 |
| attribute_byte | 字符的属性(颜色) |
| u8* const VRAM |
1.8.14