📄 kernel_c.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 + -