From af0fdb77e3246aef1dff583e9b91be92901941d1 Mon Sep 17 00:00:00 2001 From: manzerbredes Date: Sun, 19 Jul 2015 11:20:21 +0400 Subject: [PATCH] Make basic kernel --- kernel/entry.asm | 24 ++++++++++++++++++++++++ kernel/main.c | 5 +++++ 2 files changed, 29 insertions(+) create mode 100644 kernel/entry.asm create mode 100644 kernel/main.c diff --git a/kernel/entry.asm b/kernel/entry.asm new file mode 100644 index 0000000..fce89bf --- /dev/null +++ b/kernel/entry.asm @@ -0,0 +1,24 @@ +[BITS 32] + +;Define extern symbole +extern main + +;Define global symbole +global _start + +;Define kernel entry point +_start: + jmp begin ;Go to begin and run main kernel function + + +;----- Multiboot Specification Header ----- +align 4 ;Align data for 32 bits +dd 0x1BADB002 +dd 0x0 +dd 0x1BADB002 +;----- End ----- + + +begin: + call main ;Run main function + diff --git a/kernel/main.c b/kernel/main.c new file mode 100644 index 0000000..4487d56 --- /dev/null +++ b/kernel/main.c @@ -0,0 +1,5 @@ + +void main(){ + + while(1); +}