diff options
author | Alexis211 <alexis211@gmail.com> | 2009-08-21 21:16:48 +0200 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2009-08-21 21:16:48 +0200 |
commit | ae803baa4e0ec584c7afd3f6d55f2e6b32010b46 (patch) | |
tree | a8d39cdeff28d2ce08ff7485736fef8119669547 /Source/Kernel/Core/kmain.wtf.cpp | |
parent | f93a269f41659d9a33ea6f24411ca691978986cf (diff) | |
download | Melon-ae803baa4e0ec584c7afd3f6d55f2e6b32010b46.tar.gz Melon-ae803baa4e0ec584c7afd3f6d55f2e6b32010b46.zip |
System boots up and shows a nice ASCII art logo.
Diffstat (limited to 'Source/Kernel/Core/kmain.wtf.cpp')
-rw-r--r-- | Source/Kernel/Core/kmain.wtf.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Source/Kernel/Core/kmain.wtf.cpp b/Source/Kernel/Core/kmain.wtf.cpp new file mode 100644 index 0000000..59fa45a --- /dev/null +++ b/Source/Kernel/Core/kmain.wtf.cpp @@ -0,0 +1,32 @@ +#include <Core/common.wtf.h> +#include <Core/multiboot.wtf.h> + +#include <Devices/Display/VGATextOutput.class.h> +#include <DisplayManager/Disp.ns.h> + +#include <Ressources/logo.cd> + +extern u32int end; //Placement address + +extern "C" void kmain(multiboot_info_t* mbd, u32int magic); + +void kmain(multiboot_info_t* mbd, u32int magic) { + DEBUG("Entering kmain."); + + VGATextOutput vgaout; + + Disp::setDisplay(&vgaout); + + for (int i = 0; i < melonLogoLines; i++) { + int startCol = (Disp::textCols() / 2) - (melonLogoCols / 2); + for (int j = 0; j < melonLogoCols; j++) { + Disp::putChar(i + 2, j + startCol, melonLogo[i][j], 0x07); + } + } + + if (magic != MULTIBOOT_BOOTLOADER_MAGIC) { + PANIC("Error with multiboot header."); + } + + while(1); +} |