diff options
| author | Michal Idziorek <m.i@gmx.at> | 2014-08-27 15:56:52 +0200 |
|---|---|---|
| committer | Michal Idziorek <m.i@gmx.at> | 2014-08-27 15:56:52 +0200 |
| commit | d85b6209f37b4d886f9e85fd9592c9d7cf25deb9 (patch) | |
| tree | 83219e5d9ed5571ef20c8bf7bce21d595f3fcedc /kernel | |
| parent | 62c211ade1606d82f9b262b68ef074ae07e26184 (diff) | |
further cleanup of bootloader
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/kernel.c | 39 | ||||
| -rw-r--r-- | kernel/textwindow.c | 33 |
2 files changed, 54 insertions, 18 deletions
diff --git a/kernel/kernel.c b/kernel/kernel.c index 05a4f9f..efa703b 100644 --- a/kernel/kernel.c +++ b/kernel/kernel.c @@ -5,7 +5,8 @@ // TODO: cleanup . how can i compile it without the includes!?? /////// - +// interrupt handler prototypes +// todo: move somewhere else!? void int_def_handler(); void int_clock_handler(); void int_kb_handler(); @@ -14,7 +15,9 @@ void int_floppy_handler(); ////////// KERNEL MAIN///// ///// // -// test handler +// just a test handler for software interrupt 88, todo: remove and +// implement some syscalls! +// void int_test_handler() { X86_IRQ_BEGIN @@ -26,22 +29,23 @@ void int_test_handler() } +// heart of our operating system void kernel_main() { // clear console - scr_clear(); +//! scr_clear(); // hello message - scr_put_string_nl(KERNEL_HELLO_MESSAGE); - scr_put_string_nl(""); +//! scr_put_string_nl(KERNEL_HELLO_MESSAGE); +//! scr_put_string_nl(""); //pit config - //timer_init(); + timer_init(); // we know that here the bootloader placed the mamory map! - mem_init(0x7c00+0x400,*((uint16_t *)(0x7c00+0x600))); - //mem_init(0x9000); +//! mem_init(0x7c00+0x400,*((uint16_t *)(0x7c00+0x600))); + mem_init(0x9000); // we know that here the bootloader placed the mamory map! vmem_init(); @@ -72,34 +76,33 @@ void kernel_main() // now we can enable interrupts back again int_enable(); - scr_put_string_nl("interrupts: Interrupts are up and running"); +//! scr_put_string_nl("interrupts: Interrupts are up and running"); // pci pci_init(); + // floppy + floppy_init(); + // vesa init vesa_init(0x8300,0x8400); - // floppy - floppy_init(); - scr_put_string_nl(""); +//! scr_put_string_nl(""); //init shell shell_init(); // kernel main loop - uint8_t t=0; - uint8_t o=0; // while(1) // { //} - //uint8_t rawfont[]={0xff,0xff,0xc3,0xc3,0xff,0xff,0xc3,0xc3}; - //uint8_t rawfont[]={0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xff,0xff,}; - uint8_t *rawfont=0xb000; // here the floppy_init puts first sector - // after 0x8000 (font data :)) + // put some text on monitor! + + uint8_t *rawfont=0xb000; // here the floppy_init puts first sector + // after 0x8000 (font data :)) PutString(rawfont,"Welcome to Fool OS 001",10,10,0xff00); PutString(rawfont,"Welcome to Fool OS 001",20,20,0xf00); diff --git a/kernel/textwindow.c b/kernel/textwindow.c new file mode 100644 index 0000000..77c0cbc --- /dev/null +++ b/kernel/textwindow.c @@ -0,0 +1,33 @@ +#define FOOLOS_TEXTWINDOW_BUFFER_SIZE 10000 +static char *buff; + +void textwin_init(int x,int y,int w,int h,char *title, int r,int g, int b) +{ + +} + +void textwin_move(int x,int y) +{ + +} + +void textwin_resize(int w,int h) +{ + +} + +void textwin_putchar(char c) +{ + +} + +void textwin_putline(char *str,...) +{ + +} + +void textwin_render() +{ + +} + |
