Start work on VGA driver
This commit is contained in:
parent
9b707eb3f7
commit
60c56c064d
13
drivers/i386/vga.c
Normal file
13
drivers/i386/vga.c
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#include <grub/text_fb_info.h>
|
||||||
|
#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;
|
||||||
|
}
|
@ -1,4 +1,5 @@
|
|||||||
#include "../cpu/cpu_init.h"
|
#include "../cpu/cpu_init.h"
|
||||||
|
#include "../drivers/vga.h"
|
||||||
#include <grub/text_fb_info.h>
|
#include <grub/text_fb_info.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "multiboot.h"
|
#include "multiboot.h"
|
||||||
@ -15,4 +16,5 @@ void kmain(multiboot_info_t* header) {
|
|||||||
info.width=80;
|
info.width=80;
|
||||||
info.height=25;
|
info.height=25;
|
||||||
}
|
}
|
||||||
|
vga_init(info);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user