aboutsummaryrefslogtreecommitdiff
path: root/src/kernel.c
blob: 0e1b0200e8b6407478b4d41ad2908aced5f70cae (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "graphics/vga.h"
#include "gdt/gdt.h"
#include "interrupts/interrupts.h"
#include "input/input.h"
#include "timer/timer.h"

void kernel_main(void) {
    gdt_install();
    idt_install();
    isrs_install();
    irq_install();

    __asm__ __volatile__ ("sti");

    terminal_initialize();
    timer_install();
    keyboard_install();
    mouse_install();

    terminal_write_string("Melvix loaded successfully!\n");
    // __asm__  ("div %0" :: "r"(0)); // Exception testing x/0
}