summaryrefslogtreecommitdiff
path: root/kernel/main.cpp
diff options
context:
space:
mode:
authormanzerbredes <loic.guegan_secondary@yahoo.fr>2015-07-28 14:19:00 +0400
committermanzerbredes <loic.guegan_secondary@yahoo.fr>2015-07-28 14:19:00 +0400
commite0c565f7ff7620dca9dfc6c607f4798f5291c7bf (patch)
treec18099687db0202e32ae47f4c991b895191f030e /kernel/main.cpp
parentaac010a9e30e479968e277ebdaf41ad366a77098 (diff)
Go back to C and adapt codeHEADmasterdevelop
Diffstat (limited to 'kernel/main.cpp')
-rw-r--r--kernel/main.cpp52
1 files changed, 0 insertions, 52 deletions
diff --git a/kernel/main.cpp b/kernel/main.cpp
deleted file mode 100644
index 0dec7e0..0000000
--- a/kernel/main.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-//To load GDT
-#include "GDT/gdt.hpp"
-#include "./Helpers/memPrint.hpp"
-
-
-//----- Global Definition -----
-memPrint VideoRam; //Used to print data on screen
-//-----------------------------
-
-
-
-//----- PiegOS kernel main -----
-int main(){
-
- //Welcome
- VideoRam.print("Welcome to PiegOS");
-
- //Infinite loop
- while(1);
-
- //Exit code
- return 0;
-}
-
-
-
-//----- PiegOS kernel boot -----
-//Mangling the _boot function
-extern "C" void _boot(){
-
- //Create Gdt instance
- Gdt gdt;
-
- //Load Gdt into memory
- gdt.loadGdt();
-
- //Init all segments and stack
- __asm__("\
- movw $0x10, %ax; \n \
- movw %ax, %ds; \n \
- movw %ax, %es \n \
- ljmp $0x08, $updateDS;\
- updateDS: \n\
- movw $0x18, %ax \n \
- movw %ax, %ss \n \
- movl $0x00B00000, %esp \n\
- ");
-
- //Call main function after stack pointer changing (due to C++ optimisation)
- main();
-}
-