From b43c3045b47e5acccdb57f07ba82a86b3e6e3ff9 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Mon, 16 Aug 2021 22:19:20 +0200 Subject: [PATCH] Fix --- src/kernel/kernel.c | 1 + src/kernel/lib/vga.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/kernel/kernel.c b/src/kernel/kernel.c index dc83197..edf36d7 100644 --- a/src/kernel/kernel.c +++ b/src/kernel/kernel.c @@ -1,3 +1,4 @@ +#include #include "lib/vga.c" void main() { diff --git a/src/kernel/lib/vga.c b/src/kernel/lib/vga.c index 9d5d7cd..c3edfb8 100644 --- a/src/kernel/lib/vga.c +++ b/src/kernel/lib/vga.c @@ -18,7 +18,7 @@ char* get_vga_charpos_pointer(unsigned int col, unsigned int row) { return (char*)(VIDEO_MEM + 2*((row*80) + col)); } -void putc(char c, unsigned int col, unsigned int row, int colorcode) { +void writechar(char c, unsigned int col, unsigned int row, int colorcode) { char* mem = get_vga_charpos_pointer(col, row); *mem = c; // Write the character *(mem+1) = colorcode; // Write the colorcode @@ -45,7 +45,7 @@ void set_cursor_pos(unsigned int x, unsigned int y) { void print(char* str, int colorcode) { for( char* c = str; *c != '\0'; c++ ) - putc(*c, (unsigned int)(c - str) + cursor_col, cursor_row, colorcode); + writechar(*c, (unsigned int)(c - str) + cursor_col, cursor_row, colorcode); } void println(char* str, int colorcode) {