-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkernel.c
More file actions
28 lines (22 loc) · 731 Bytes
/
kernel.c
File metadata and controls
28 lines (22 loc) · 731 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include "terminal.h"
#include "idt.h"
#include "pic.h"
#include "keyboard.h"
#include "kprintf.h"
#include "shell.h"
#include "timer.h"
void kernel_main(void) {
terminal_init();
idt_init();
pic_init();
keyboard_init();
timer_init();
__asm__ volatile ("sti");
terminal_setcolor(terminal_make_color(COLOR_WHITE, COLOR_BLACK));
terminal_writestring("clickOS\n");
terminal_setcolor(terminal_make_color(COLOR_DARK_GREY, COLOR_BLACK));
kprintf("IDT at 0x%p | build %s %s\n", kernel_main, __DATE__, __TIME__);
terminal_setcolor(terminal_make_color(COLOR_LIGHT_GREY, COLOR_BLACK));
terminal_writestring("Type 'help' for available commands.");
shell_run(); /* never returns */
}