nothing works but time to update

This commit is contained in:
2026-04-14 10:04:20 -04:00
parent 2e3dfa9583
commit 437e7ff593
12 changed files with 238 additions and 0 deletions

25
kernel.c Normal file
View File

@@ -0,0 +1,25 @@
void clear_screen() {
char* video_memory = (char*) 0xb8000;
for (int i = 0; i < 80 * 25 * 2; i += 2) {
video_memory[i] = ' '; // Clear char
video_memory[i+1] = 0x07; // Light grey on black
}
}
void print_string(char* str, unsigned char color, int line) {
char* video_memory = (char*) 0xb8000;
int offset = line * 160;
for (int i = 0; str[i] != '\0'; i++) {
video_memory[offset + (i * 2)] = str[i];
video_memory[offset + (i * 2) + 1] = color;
}
}
void main() {
clear_screen();
print_string("Welcome to ISCCS OS!", 0x0a, 1);
print_string("Kernel Loaded in 32-bit Protected Mode.", 0x0f, 2);
while(1);
}