aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/kernel.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/kernel.c')
-rw-r--r--src/kernel/kernel.c49
1 files changed, 40 insertions, 9 deletions
diff --git a/src/kernel/kernel.c b/src/kernel/kernel.c
index 5f6f5ae..1fca95b 100644
--- a/src/kernel/kernel.c
+++ b/src/kernel/kernel.c
@@ -1,6 +1,5 @@
#include "print.h"
-// Check if the compiler thinks we are targeting the wrong OS
#if defined(__linux__)
#error "Not using cross compiler!"
#endif
@@ -10,16 +9,48 @@
#error "Must use ix86-elf compiler"
#endif
+void motd() {
+ char *empty_row = " "
+ " \n";
+ empty_row[0] = (char)186;
+ empty_row[79] = (char)186;
+
+ printf("%c", 201);
+ for (int i = 0; i < 78; i++)
+ printf("%c", 205);
+ printf("%c\n", 187);
+
+ printf(empty_row);
+
+ printf("%c", 186);
+ for (int i = 0; i < 78 / 2 - 17 / 2; i++)
+ printf(" ");
+ printf("Welcome to gftos!");
+ for (int i = 0; i < 78 / 2 - 17 / 2 - 1; i++)
+ printf(" ");
+ printf("%c\n", 186);
+
+ for (int i = 0; i < 21; i++) {
+ printf(empty_row);
+ }
+
+ printf("%c", 200);
+ for (int i = 0; i < 78; i++)
+ printf("%c", 205);
+ printf("%c", 188);
+}
+
void kernel_main(void) {
print_clear();
- for (int r = 0; r < 24; r++) {
- for (int c = 0; c < 80; c += 3) {
- int color = (r + c) % 15 + 1;
- print_set_color(color, PRINT_COLOR_BLACK);
- printf(":3 ");
- }
- printf("%n");
- }
+ motd();
+ // for (int r = 0; r < 24; r++) {
+ // for (int c = 0; c < 80; c += 3) {
+ // int color = (r + c) % 15 + 1;
+ // print_set_color(color, PRINT_COLOR_BLACK);
+ // printf(":3");
+ // }
+ // printf("%n");
+ // }
// print_set_color(PRINT_COLOR_YELLOW, PRINT_COLOR_BLACK);
// printf("printf\n\tint: %d\n\tstring: %s\n\tchar: %c\n\tpercent: "
// "%%\n\tnothing: %n",