mirror of
https://github.com/fergalmoran/ferglos.git
synced 2026-01-25 01:55:04 +00:00
38 lines
938 B
C++
38 lines
938 B
C++
/*
|
|
* kernel.cpp
|
|
* Author: Fergal Moran
|
|
* Copyright: 2020 Fergal Moran
|
|
*
|
|
* BSD License - do what you want
|
|
*/
|
|
|
|
#include "../include/gdt.h"
|
|
#include "../include/interrupts.h"
|
|
#include "../include/keyboard.h"
|
|
#include "../include/mouse.h"
|
|
#include "../include/stdio.h"
|
|
#include "../include/types.h"
|
|
|
|
typedef void (*constructor)();
|
|
extern "C" constructor start_ctors;
|
|
extern "C" constructor end_ctors;
|
|
extern "C" void call_constructors() {
|
|
for (constructor* i = &start_ctors; i != &end_ctors; i++)
|
|
(*i)();
|
|
}
|
|
|
|
extern "C" void ferglos_Main(const void* /*multiboot_structure*/, uint32_t /*mb_mag*/) {
|
|
clear();
|
|
printf("FerglOS v0.0.2!\n");
|
|
printf("Floats like a lepidoptera, stings like a hymenoptera\n");
|
|
|
|
GlobalDescriptorTable gdt;
|
|
InterruptManager interrupts(&gdt);
|
|
KeyboardDriver keyboard(&interrupts);
|
|
MouseDriver mouse(&interrupts);
|
|
|
|
interrupts.Activate();
|
|
|
|
while (1)
|
|
;
|
|
} |