提交 b9c322d5 创建 作者: Silas Boyd-Wickizer's avatar Silas Boyd-Wickizer

Fix CGA scrolling.

上级 21a46387
* fix cga console (it doesn't scroll correctly)
* get gcc asm labels working for cpu, proc, kmem
- (I couldn't stop gcc from generating RIP-relative movs)
* get something like asm labels working in clang
......
......@@ -27,9 +27,9 @@ cgaputc(int c)
crt[pos++] = (c&0xff) | color;
if((pos/80) >= 24){ // Scroll up.
memmove((void*)crt, (void*)crt+80, sizeof(crt[0])*23*80);
memmove((void *)crt, (void*)(crt+80), sizeof(crt[0])*23*80);
pos -= 80;
memset((void*)crt+pos, 0, sizeof(crt[0])*(24*80 - pos));
memset((void *)(crt+pos), 0, sizeof(crt[0])*(24*80 - pos));
}
outb(CRTPORT, 14);
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论