diff --git a/src/impl/kernel/kernel.bin b/src/impl/kernel/kernel.bin new file mode 100644 index 0000000..295bcc7 Binary files /dev/null and b/src/impl/kernel/kernel.bin differ diff --git a/src/impl/kernel/main.c b/src/impl/kernel/main.c index 143be57..4fdb2d6 100644 --- a/src/impl/kernel/main.c +++ b/src/impl/kernel/main.c @@ -1,4 +1,4 @@ -#include "print.h" +#include "../../../../../../" void kernel_main() { diff --git a/src/impl/print.c b/src/impl/print.c index 20eca8a..de60a67 100644 --- a/src/impl/print.c +++ b/src/impl/print.c @@ -17,8 +17,8 @@ uint8_t color = PRINT_COLOR_WHITE | PRINT_COLOR_BLACK << 4; void clear_row(size_t row) { struct Char empty = (struct Char){ - character : '', - color : color, + 0, + color, }; for (size_t col = 0; col < NUM_COLS; col++) @@ -62,7 +62,7 @@ void print_char(char character) if (character == '\n') { print_newline(); - return + return; } if (col > NUM_COLS) @@ -71,8 +71,8 @@ void print_char(char character) } buffer[col + NUM_COLS * row] = (struct Char){ - character : (uint8_t)character, - color : color, + (uint8_t)character, + color, }; col++; @@ -89,7 +89,7 @@ void print_str(char *str) return; } - print_char(character)'' + print_char(character); } } diff --git a/src/impl/x86_64/boot/main.asm b/src/impl/x86_64/boot/main.asm index ddf5793..57063c2 100644 --- a/src/impl/x86_64/boot/main.asm +++ b/src/impl/x86_64/boot/main.asm @@ -1,9 +1,9 @@ -global start +global _start extern long_mode_start section .text bits 32 -start: +_start: mov esp, stack_top call check_multiboot @@ -134,4 +134,4 @@ gdt64: dq (1 << 43) | (1 << 44) | (1 << 47) | (1 << 53) ; code segment .pointer: dw $ - gdt64 - 1 ; length - dq gdt64 ; address \ No newline at end of file + dq gdt64 ; address diff --git a/src/impl/x86_64/boot/main64.asm b/src/impl/x86_64/boot/main64.asm index 13d783c..a5954a3 100644 --- a/src/impl/x86_64/boot/main64.asm +++ b/src/impl/x86_64/boot/main64.asm @@ -12,5 +12,5 @@ long_mode_start: mov fs, ax mov gs, ax - call kernel_main + call kernel_main hlt diff --git a/src/intf/print.h b/src/intf/print.h index bb4fff8..ce7c43e 100644 --- a/src/intf/print.h +++ b/src/intf/print.h @@ -19,9 +19,8 @@ enum { PRINT_COLOR_LIGHT_RED = 12, PRINT_COLOR_PINK = 13, PRINT_COLOR_YELLOW = 14, - PRINT_COLOR_WHITE = 15, - -} + PRINT_COLOR_WHITE = 15 +}; void print_clear(); void print_char(char character);