fix status line dsplay when scrolling

This commit is contained in:
Mathieu Maret 2018-07-19 14:01:53 +02:00
parent 2352c67b7a
commit 5fe28f3c26
4 changed files with 3 additions and 5 deletions

View File

@ -1,2 +0,0 @@
core/irq_handler.o: core/irq_handler.c core/interrupt.h core/types.h \
core/io.h core/irq.h drivers/pic.h drivers/vga.h

Binary file not shown.

View File

@ -81,7 +81,7 @@ void vgaScrollUp(void)
VGA_WIDTH * sizeof(short));
}
for (int i = 0; i < VGA_WIDTH; i++) {
vga[(VGA_HEIGHT - 1) * VGA_WIDTH + i] = colorAttr;
vga[(VGA_HEIGHT - 2) * VGA_WIDTH + i] = colorAttr;
}
}
@ -97,7 +97,7 @@ void printChar(const char str)
if (str == '\n') {
line++;
col = 0;
if (line >= VGA_HEIGHT) {
if (line >= VGA_HEIGHT - 1) {
vgaScrollUp();
line--;
}
@ -122,7 +122,7 @@ void printChar(const char str)
col = 0;
line++;
}
if (line >= VGA_HEIGHT) {
if (line >= VGA_HEIGHT - 1) {
vgaScrollUp();
line--;
}

Binary file not shown.