Removed unneeded styling

pull/37/head
E. Almqvist 3 years ago
parent 246a830669
commit c1455e0859
  1. 4
      drivers/vga.c
  2. 1
      drivers/vga.h
  3. 11
      kernel/kernel.c

@ -24,7 +24,7 @@ char* get_memory_charpos(unsigned int col, unsigned int row) {
void writechar(char c, unsigned int col, unsigned int row, int attribute_byte) { void writechar(char c, unsigned int col, unsigned int row, int attribute_byte) {
if( !attribute_byte ) if( !attribute_byte )
attribute_byte = 0x0f; attribute_byte = DEFAULT_COLOR;
char* mem = get_memory_charpos(col, row); char* mem = get_memory_charpos(col, row);
*mem = c; // Write the character *mem = c; // Write the character
@ -44,7 +44,7 @@ void set_cursor_pos(unsigned int col, unsigned int row) {
void clear_screen() { void clear_screen() {
for( int c = 0; c < MAX_COLS; c++ ) for( int c = 0; c < MAX_COLS; c++ )
for( int r = 0; r < MAX_ROWS; r++ ) for( int r = 0; r < MAX_ROWS; r++ )
writechar(0x20, c, r, 0xf0); writechar(0x20, c, r, 0x0);
} }
/* /*

@ -1,6 +1,7 @@
#define VGA_ADDRESS (char*)0xb8000 #define VGA_ADDRESS (char*)0xb8000
#define VGA_ADDRESS_MAX (char*)0xb8fa0 #define VGA_ADDRESS_MAX (char*)0xb8fa0
#define DEFAULT_COLOR 0x07
#define MAX_ROWS 25 #define MAX_ROWS 25
#define MAX_COLS 80 #define MAX_COLS 80

@ -8,17 +8,14 @@ void main() {
// i.e. clear the screen et cetera. // i.e. clear the screen et cetera.
char* title = "eOS Version 0.2 2021"; char* title = "eOS Version 0.2 2021";
set_cursor_pos(0, 2); println(title, DEFAULT_COLOR);
printalign(title, 0xf0, MIDDLE);
char* subtitle = "A x86 operating system, licenced under GPL-2.0"; char* subtitle = "A x86 operating system, licenced under GPL-2.0";
set_cursor_pos(0, 3); println(subtitle, DEFAULT_COLOR);
printalign(subtitle, 0xf8, MIDDLE);
char* strbuf = "String concat: "; char* strbuf = "String concat: ";
char* str2 = "WORKS! :D"; char* str2 = "WORKS! :D";
strbuf = strcat(strbuf, str2); strbuf = strcat(strbuf, str2);
set_cursor_pos(0, 0); set_cursor_pos(0, 4);
println(strbuf, 0xf0); println(strbuf, DEFAULT_COLOR);
} }

Loading…
Cancel
Save