Initial bootloader and kernel loader

This commit is contained in:
Hjin-BF
2026-02-27 22:22:48 +02:00
parent cb85514593
commit d069fc23bd
7 changed files with 160 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
#include <stddef.h>
void kernel_main(void) {
volatile char *video = (volatile char*) 0xB8000;
const char *msg = "LiteOS kernel started";
for (size_t i = 0; msg[i] != '\0'; i++) {
video[i * 2] = msg[i];
video[i * 2 + 1] = 0x07; // світло-сірий текст
}
while (1) {
__asm__("hlt");
}
}