diff options
-rw-r--r-- | src/drivers/pc80/vga/vga.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/drivers/pc80/vga/vga.c b/src/drivers/pc80/vga/vga.c index d970fea6b1..9961e3f59d 100644 --- a/src/drivers/pc80/vga/vga.c +++ b/src/drivers/pc80/vga/vga.c @@ -60,7 +60,7 @@ vga_fb_clear(void) static void vga_palette_init(void) { - unsigned int i; + size_t i; /* set up attribute registers */ for (i = 0; i < 0x10; i++) @@ -168,7 +168,7 @@ static void vga_font_8x16_load(void) { unsigned char *p; - int i, j; + size_t i, j; unsigned char sr2, sr4, gr5, gr6; #define height 16 @@ -236,7 +236,7 @@ vga_cursor_reset(void) void vga_cursor_set(unsigned int line, unsigned int character) { - unsigned int offset = (80 * line + character) & 0xFFFF; + unsigned int offset = (VGA_COLUMNS * line + character) & 0xFFFF; vga_cr_write(0x0A, 0x0E); vga_cr_write(0x0B, 0x0E); @@ -250,7 +250,7 @@ vga_cursor_set(unsigned int line, unsigned int character) void vga_frame_set(unsigned int line, unsigned int character) { - unsigned int offset = (80 * line + character) & 0xFFFF; + unsigned int offset = (VGA_COLUMNS * line + character) & 0xFFFF; vga_cr_write(0x0C, offset >> 8); vga_cr_write(0x0D, offset & 0xFF); @@ -262,10 +262,10 @@ vga_frame_set(unsigned int line, unsigned int character) void vga_line_write(unsigned int line, const char *string) { - unsigned short *p = (unsigned short *)VGA_FB + (80 * line); - int i, len = strlen(string); + unsigned short *p = (unsigned short *)VGA_FB + (VGA_COLUMNS * line); + size_t i, len = strlen(string); - for (i = 0; i < 80; i++) { + for (i = 0; i < VGA_COLUMNS; i++) { if (i < len) p[i] = 0x0F00 | string[i]; else |