hippOS/kernel.c
hippoz 4cc8bb5ec7
Initial commit:
Barebones kernel that can print to a "tty". Has some basic functions
like memcpy, strlen, etc.
A GDT is also present, however it has not yet been properly tested.
The folder structure is currently not optimal or well organized.
2022-02-22 14:01:39 +02:00

24 lines
638 B
C

#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include "vga.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
/* This tutorial will only work for the 32-bit ix86 targets. */
#if !defined(__i386__)
#error "This OS needs to be compiled with a ix86-elf compiler"
#endif
void kernel_main(void)
{
/* Initialize terminal interface */
terminal_initialize();
/* Newline support is left as an exercise. */
terminal_writestring("Hello, kernel World!\n");
}