diff options
Diffstat (limited to 'console.c')
-rw-r--r-- | console.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -107,7 +107,7 @@ panic(char *s) { int i; uint pcs[10]; - + cli(); cons.locking = 0; cprintf("cpu%d: panic: ", cpu->id); @@ -130,7 +130,7 @@ static void cgaputc(int c) { int pos; - + // Cursor position: col + 80*row. outb(CRTPORT, 14); pos = inb(CRTPORT+1) << 8; @@ -146,13 +146,13 @@ cgaputc(int c) if(pos < 0 || pos > 25*80) panic("pos under/overflow"); - + if((pos/80) >= 24){ // Scroll up. memmove(crt, crt+80, sizeof(crt[0])*23*80); pos -= 80; memset(crt+pos, 0, sizeof(crt[0])*(24*80 - pos)); } - + outb(CRTPORT, 14); outb(CRTPORT+1, pos>>8); outb(CRTPORT, 15); |