Commit 0bd91897 authored by Mathieu Maret's avatar Mathieu Maret

vga: add clearScreenLine

parent 27293c80
......@@ -25,6 +25,15 @@ void clearScreen(uint bgColor)
}
}
void clearScreenLine(uint bgColor, uint line)
{
volatile short *vga = (short *)VGA_ADDR;
long int colorAttr = bgColor << 12;
for (uint i = VGA_WIDTH * line; i < VGA_WIDTH * (line + 1); i++) {
vga[i] = colorAttr;
}
}
void printInt(int integer)
{
char num[sizeof(int) *
......
......@@ -20,6 +20,7 @@ void vprintf(const char *format, va_list ap);
void printf(const char *format, ...);
int VGASetup(uint bgColor, uint color);
void clearScreen(uint bgColor);
void clearScreenLine(uint bgColor, uint line);
void printInt(int integer);
void printIntDetails(int integer, uint color, uint bgColor, int startX, int startY);
void printCharDetails(char str, uint color, uint bgColor, int startX, int startY);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment