diff --git a/drivers/i386/vga.c b/drivers/i386/vga.c new file mode 100644 index 0000000..9f729a1 --- /dev/null +++ b/drivers/i386/vga.c @@ -0,0 +1,13 @@ +#include +#include "../vga.h" +char* screen; +int width; +int height; +vga_colors fg_color=VGA_WHITE; +vga_colors bg_color=VGA_BLACK; + +void vga_init(text_fb_info framebuffer_info) { + screen=framebuffer_info.address; + width=framebuffer_info.width; + height=framebuffer_info.height; +} diff --git a/kernel/kernel.c b/kernel/kernel.c index 6c122e8..9c1899e 100644 --- a/kernel/kernel.c +++ b/kernel/kernel.c @@ -1,4 +1,5 @@ #include "../cpu/cpu_init.h" +#include "../drivers/vga.h" #include #include #include "multiboot.h" @@ -15,4 +16,5 @@ void kmain(multiboot_info_t* header) { info.width=80; info.height=25; } + vga_init(info); }