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) {
if( !attribute_byte )
attribute_byte = 0x0f;
attribute_byte = DEFAULT_COLOR;
char* mem = get_memory_charpos(col, row);
*mem = c; // Write the character
@ -44,7 +44,7 @@ void set_cursor_pos(unsigned int col, unsigned int row) {
void clear_screen() {
for( int c = 0; c < MAX_COLS; c++ )
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_MAX (char*)0xb8fa0
#define DEFAULT_COLOR 0x07
#define MAX_ROWS 25
#define MAX_COLS 80

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

Loading…
Cancel
Save