BarryServer : Git

All the code for all my projects
// BarryServer : Git / Nucleus / commit / c629653991780509799e2e00d3b074dc0e0ef313 / kernel / main.c

// Related

Nucleus

Barry Initial commit c629653 (3 years, 3 months ago)
diff --git a/kernel/main.c b/kernel/main.c
new file mode 100644
index 0000000..c2eb55d
--- /dev/null
+++ b/kernel/main.c
@@ -0,0 +1,21 @@
+/*
+ * This file contains the entrance point for the Kernel proper.  The code here
+ * is called by the bootloader when it finishes.  The kmain routine is
+ * responsible for setting up memory and starting the processes running.
+ */
+
+#include <stdint.h>
+#include <string.h>
+#include "multiboot.h"
+
+extern char _bss[], _end[];
+
+/* Kernel main function */
+_Noreturn void
+kmain(uint32_t esp, struct MultibootInfo *mbinfo)
+{
+	void *ebda = (void *) (*((uint16_t *) 0x040E) << 4);
+	memset(_bss, 0, _end - _bss);
+
+	while (1);
+}