diff --git a/kernel/drivers/video/vga.c b/kernel/drivers/video/vga.c index 9f4eb88..3edb4ca 100644 --- a/kernel/drivers/video/vga.c +++ b/kernel/drivers/video/vga.c @@ -37,7 +37,7 @@ term_putentryat(char c, uint8_t color, size_t x, size_t y) void term_putchar(char c) { - term_putentryat(c, term_color, term_row); + term_putentryat(c, term_color, term_col, term_row); if (++term_col == VGA_WIDTH) { term_col = 0; if (++term_row == VGA_HEIGHT) { @@ -49,7 +49,7 @@ term_putchar(char c) void term_writestr(const char* data) { - for (size_t i = 0; i < strlen(data); i++) { + for (size_t i = 0; data[i] != '\0'; i++) { term_putchar(data[i]); } } diff --git a/kernel/include/drivers/video/vga.h b/kernel/include/drivers/video/vga.h index 5c320e1..fae89c9 100644 --- a/kernel/include/drivers/video/vga.h +++ b/kernel/include/drivers/video/vga.h @@ -41,10 +41,10 @@ vga_entry(unsigned char uc, uint8_t color) #define VGA_HEIGHT 25 #define VGA_MEMORY 0xB8000 /* VGA memory location */ -void term init(void); +void term_init(void); void term_setcolor(uint8_t color); void term_putentryat(char c, uint8_t color, size_t x, size_t y); void term_putchar(char c); void term_writestr(const char* data); -#endif #VGA_H +#endif // VGA_H