os/kernel/kernel.c

29 lines
761 B
C
Raw Normal View History

2024-07-11 08:56:52 +02:00
#include <kernel/tty.h>
#include <kernel/interrupt.h>
#include <debugging.h>
/* Check if the compiler thinks you are targeting the wrong operating system. */
#if defined(__linux__)
#error "You are not using a cross-compiler, you will most certainly run into trouble"
#endif
2024-07-11 08:56:52 +02:00
void kernel_main(void)
{
/* Initialize terminal interface */
terminal_initialize();
// TODO: Add interrupts
// idt_init();
2024-07-11 08:56:52 +02:00
terminal_putchar(get_last_key_pressed());
char current_character = get_last_key_pressed();
while (current_character != ',') {
char tmp = get_last_key_pressed();
if (current_character != -1 && tmp != current_character) {
terminal_putchar(current_character);
}
current_character = tmp;
}
}