34 lines
627 B
C
34 lines
627 B
C
#include <stdio.h>
|
|
#include <stdint.h>
|
|
|
|
#include <kernel/_kernel.h>
|
|
#include <kernel/tty.h>
|
|
#include <kernel/serial.h>
|
|
#include <kernel/x86/gdt.h>
|
|
#include <kernel/x86/idt.h>
|
|
#include <kernel/x86/pic.h>
|
|
|
|
void kmain(void)
|
|
{
|
|
#ifdef __TESTING__ // important components should be declared first, but if we're testing we want to log all of that
|
|
terminal_initialize();
|
|
serial_initialize();
|
|
#endif
|
|
gdt_init();
|
|
idt_init();
|
|
PIC_remap(0x20, 0x28);
|
|
|
|
#ifndef __TESTING__
|
|
terminal_initialize();
|
|
serial_initialize();
|
|
#endif
|
|
|
|
uint8_t a = 2;
|
|
uint16_t b = 3;
|
|
int c = 4;
|
|
|
|
uint64_t d = 10;
|
|
|
|
printf("%d, %d, %d, %3", a, b, c, d);
|
|
}
|