From 89e8d604a2381211d5c0a2f45b19123e98956469 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Mon, 16 Aug 2021 22:17:51 +0200 Subject: [PATCH 1/5] Cleanup --- src/kernel/kernel.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/kernel/kernel.c b/src/kernel/kernel.c index ce6a1ec..dc83197 100644 --- a/src/kernel/kernel.c +++ b/src/kernel/kernel.c @@ -1,11 +1,7 @@ #include "lib/vga.c" void main() { - // Do kernel stuff - char* vidmem = (char*)0xb8000; - *vidmem = 'X'; - clear_screen(); set_cursor_pos(24, 0); - println("\t eOS Version 0.0 2021", 0xf0); + println("eOS Version 0.0 2021", 0xf0); } From b43c3045b47e5acccdb57f07ba82a86b3e6e3ff9 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Mon, 16 Aug 2021 22:19:20 +0200 Subject: [PATCH 2/5] 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) { From c04c54d56b85ab97036d9bdb84c7b3634f0df5da Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Mon, 16 Aug 2021 22:31:27 +0200 Subject: [PATCH 3/5] Stuff --- src/kernel/kernel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kernel/kernel.c b/src/kernel/kernel.c index edf36d7..f28ca99 100644 --- a/src/kernel/kernel.c +++ b/src/kernel/kernel.c @@ -3,6 +3,6 @@ void main() { clear_screen(); - set_cursor_pos(24, 0); - println("eOS Version 0.0 2021", 0xf0); + set_cursor_pos(28, 2); + print("eOS Version 0.0 2021", 0xf0); } From c0e52de5560753ce9959dafaf5de3101b3c97115 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Mon, 16 Aug 2021 22:47:36 +0200 Subject: [PATCH 4/5] Cleanup --- src/kernel/kernel.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/kernel/kernel.c b/src/kernel/kernel.c index f28ca99..649216f 100644 --- a/src/kernel/kernel.c +++ b/src/kernel/kernel.c @@ -1,4 +1,3 @@ -#include #include "lib/vga.c" void main() { From 8fa532ef32753bfe63f8c918402a5e67e16ee531 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Mon, 16 Aug 2021 23:08:30 +0200 Subject: [PATCH 5/5] Version 0.1 --- src/kernel/kernel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kernel/kernel.c b/src/kernel/kernel.c index 649216f..bf1bd80 100644 --- a/src/kernel/kernel.c +++ b/src/kernel/kernel.c @@ -3,5 +3,5 @@ void main() { clear_screen(); set_cursor_pos(28, 2); - print("eOS Version 0.0 2021", 0xf0); + print("eOS Version 0.1 2021", 0xf0); }