Refactor etc

rust
E. Almqvist 3 years ago
parent 5097d32bda
commit 572be221b3
  1. 2
      drivers/vga.c
  2. 34
      kernel/kernel.c

@ -16,7 +16,7 @@ void vga_init() {
// Clear screen
// clear_row(0);
clear_screen();
// clear_screen();
set_cursor_pos(0, 0);
}

@ -1,10 +1,23 @@
#include "kernel.h"
char** eos_art = {
"\0"
};
void kernel_motd() {
printalign(" ___ ____ ", BANNER_COLOR, MIDDLE);
printalign(" ___ / _ \\/ ___| ", BANNER_COLOR, MIDDLE);
printalign(" / _ \\ | | \\___ \\ ", BANNER_COLOR, MIDDLE);
printalign("| __/ |_| |___) | A x86 operating system,", BANNER_COLOR, MIDDLE);
printalign(" \\___|\\___/|____/ licenced under GPL-2.0", BANNER_COLOR, MIDDLE);
println("");
printalign("Fun fact: e = lim[h->0] (1+h)^(1/h)", DEFAULT_COLOR, MIDDLE);
printalign("Created by Elias Almqvist", DEFAULT_COLOR, MIDDLE);
}
void kernel_init() {
// Display a nice MOTD
clear_screen();
kernel_motd();
vga_init(); // Initialize the screen first
// i.e. clear the screen et cetera.
@ -15,19 +28,4 @@ void kernel_init() {
// TODO: make this work
// enable_paging();
printalign(" ___ ____ ", BANNER_COLOR, MIDDLE);
printalign(" ___ / _ \\/ ___| ", BANNER_COLOR, MIDDLE);
printalign(" / _ \\ | | \\___ \\ ", BANNER_COLOR, MIDDLE);
printalign("| __/ |_| |___) | A x86 operating system,", BANNER_COLOR, MIDDLE);
printalign(" \\___|\\___/|____/ licenced under GPL-2.0", BANNER_COLOR, MIDDLE);
println("");
printalign("Fun fact: e = lim[h->0] (1+h)^(1/h)", DEFAULT_COLOR, MIDDLE);
printalign("Created by Elias Almqvist", DEFAULT_COLOR, MIDDLE);
// for(char* line = *eos_art; line; line=*++eos_art) {
// print(":::: ");
// printalign(line, DEFAULT_COLOR);
// }
}

Loading…
Cancel
Save