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

📄 kernel_c.c

📁 John Fine的OS模型// 源代码// C & ASM// 英文
💻 C
字号:
// When started from bootf we get to this code with a temporary GDT,
// a temporary stack, temporary page tables, no TSS, no IDT and interrupts
// disabled.
//
// There is a fair amount of ASM work to be done before we can do much safely
// in C;  But ignoring all that we execute some C code just to prove we got
// here.

char message[] = "Executing the C code";
void test(void) {
	char *source = message;
	char *destination = (char *)0xB8000;

	while (*source) {
		*destination++ = *source++;
		*destination++ = 7; }

	for (;;) ; // Hang:  There is nowhere to return to
}

⌨️ 快捷键说明

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