vga_setcolor(VGA_YELLOW | VGA_BRIGHT, VGA_BLACK);
drawtext(line & 7, row, buf);
- for(i=0; i<65536 * 4; i++) {
+ for(i=0; i<65536 * 16; i++) {
buf[0] = twirl[(i >> 15) & 3];
buf[1] = 0;
vga_setcolor(VGA_WHITE, VGA_BLACK);
void vga_scroll(int s)
{
- yoffs = s % 25;
+ yoffs = s & 0x1f;
s = yoffs * 80;
crtc_write(CRTC_START_H, s >> 8);
crtc_write(CRTC_START_L, s);
ptr = (uint16_t*)0xb8000 + row * 80;
memset16(ptr, attr, 80);
- if(row - 25 >= 0) {
+ if(row - 32 >= 0) {
/* write a copy to wrap-around future scrolling */
- ptr -= 80 * 25;
+ ptr -= 80 * 32;
memset16(ptr, attr, 80);
}
}
ptr = (uint16_t*)0xb8000 + y * 80 + x;
*ptr = val;
- if(y - 25 >= 0) {
+ if(y - 32 >= 0) {
/* write a copy to wrap-around future scrolling */
- ptr -= 80 * 25;
+ ptr -= 80 * 32;
*ptr = val;
}
}