SoraOS/kernel.c
2025-11-25 21:03:44 +00:00

47 lines
994 B
C

// File: kernel.c
// SoraOS Kernel - Main entry point
// INFO:
// 0xA0000 for EGA/VGA graphics modes (64 KB)
// 0xB0000 for monochrome text mode (32 KB)
// 0xB8000 for color text mode and CGA-compatible graphics modes (32 KB)
#include "kernel.h"
#include "stdio.h"
typedef struct {
char user_name[32];
char user_hostname[32];
unsigned int user_id;
} user;
void kmain(void) {
user current_user = {
.user_name = "admin",
.user_hostname = "soraos",
.user_id = 0
};
__clear_screen();
printf("SoraOS Kernel Initialized!\n");
printf("\tWelcome to SoraOS!\n");
printf("\tKernel Version: %s\n", __KERNEL_VERSION);
printf("\tCompiled on: %s at %s\n\n", __DATE__, __TIME__);
// TODO: CLI IDEA
int _count = printf("%s@%s:>", current_user.user_name, current_user.user_hostname);
scursor(_count, text_pos.line);
// TODO: Enable user input handling
// Infinite loop
while (1) {
__asm__ volatile("hlt");
}
}