8 static size_t vga_cols, vga_rows;
9 static size_t vga_x, vga_y;
10 static uint16_t *vga_base;
17 vga_base = (uint16_t *) ptov (0xb8000);
25 for (i = 0; i < vga_cols * vga_rows; i++)
35 if (vga_y >= vga_rows)
38 memmove (vga_base, vga_base + vga_cols,
39 vga_cols * (vga_rows - 1) * 2);
40 memset (vga_base + vga_cols * (vga_rows - 1),
48 uint16_t cp = (vga_x + vga_cols * vga_y);
49 outw (0x3d4, 0x0e | (cp & 0xff00));
50 outw (0x3d4, 0x0f | (cp << 8));
76 vga_x = (vga_x + 8) / 8 * 8;
77 if (vga_x >= vga_cols)
82 vga_base[vga_x + vga_y * vga_cols] = 0x0700 | c;
84 if (vga_x >= vga_cols)