fix scrolling

This commit is contained in:
Mathieu Maret 2018-11-07 17:38:28 +01:00
parent 6cb8b4372a
commit d95728bbd1

View File

@ -75,7 +75,7 @@ void vgaScrollUp(void)
{ {
long int colorAttr = vgaBgColor << 12; long int colorAttr = vgaBgColor << 12;
volatile short *vga = (short *)VGA_ADDR; volatile short *vga = (short *)VGA_ADDR;
for (int i = 1; i < VGA_HEIGHT - 2; for (int i = 1; i < VGA_HEIGHT - 1;
i++) { // last line is status line. Do not scroll it i++) { // last line is status line. Do not scroll it
memcpy((void *)&vga[VGA_WIDTH * (i - 1)], (void *)&vga[VGA_WIDTH * i], memcpy((void *)&vga[VGA_WIDTH * (i - 1)], (void *)&vga[VGA_WIDTH * i],
VGA_WIDTH * sizeof(short)); VGA_WIDTH * sizeof(short));