Fixing vga_write_line_color newline colour
This commit is contained in:
parent
663a6317c4
commit
7d576d3cd5
1 changed files with 2 additions and 2 deletions
4
vga.c
4
vga.c
|
@ -8,6 +8,7 @@
|
|||
unsigned int cursor_loc = CURSOR_HOME;
|
||||
unsigned char fgcolor;
|
||||
unsigned char bgcolor;
|
||||
unsigned short blank;
|
||||
|
||||
static unsigned char vga_entry_color(enum vga_color fg, enum vga_color bg) {
|
||||
return fg | bg << 4;
|
||||
|
@ -26,17 +27,16 @@ void vga_set_color(enum vga_color fg, enum vga_color bg) {
|
|||
}
|
||||
void vga_init(enum vga_color fg, enum vga_color bg) {
|
||||
vga_set_color(fg, bg);
|
||||
blank = vga_blank_entry();
|
||||
cls();
|
||||
}
|
||||
void cls(void) {
|
||||
unsigned short blank = vga_blank_entry();
|
||||
int i;
|
||||
for (i=0; i<VGA_HEIGHT*VGA_WIDTH;i++) {
|
||||
*((unsigned short *) VGA_MEM_ADDR+i) = blank;
|
||||
}
|
||||
}
|
||||
void scroll(void) {
|
||||
unsigned short blank = vga_blank_entry();
|
||||
int y;
|
||||
int x;
|
||||
*((unsigned short *) VGA_MEM_ADDR+cursor_loc) = blank;
|
||||
|
|
Loading…
Reference in a new issue