This commit is contained in:
nub31
2025-08-24 00:37:34 +02:00
parent a9324bbea8
commit b153dab9e2
4 changed files with 7 additions and 4 deletions

View File

@@ -2,3 +2,6 @@ menuentry "nub-os" {
multiboot2 /boot/kernel multiboot2 /boot/kernel
boot boot
} }
set default="nub-os"
set timeout=0

View File

@@ -2,6 +2,6 @@
void kernel_main(void) void kernel_main(void)
{ {
vga_reset(); vga_clear();
vga_print("Welcome to nub OS\n"); vga_print("Welcome to nub OS\n");
} }

View File

@@ -23,7 +23,7 @@ vga_char vga_char_at(uint8_t row, uint8_t col)
return vga_buffer[COLUMNS * row + col]; return vga_buffer[COLUMNS * row + col];
} }
void vga_reset(void) void vga_clear(void)
{ {
for (uint8_t row = 0; row < ROWS; row++) for (uint8_t row = 0; row < ROWS; row++)
{ {
@@ -83,7 +83,7 @@ void vga_print_char(char character, vga_color_t color)
{ {
for (uint8_t col = 0; col < COLUMNS; col++) for (uint8_t col = 0; col < COLUMNS; col++)
{ {
vga_set_char(row, col, vga_char_at(row - 1, col)); vga_set_char(row - 1, col, vga_char_at(row, col));
} }
} }

View File

@@ -21,7 +21,7 @@
typedef uint8_t vga_color_t; typedef uint8_t vga_color_t;
void vga_reset(void); void vga_clear(void);
void vga_set_cursor_position(uint8_t row, uint8_t col); void vga_set_cursor_position(uint8_t row, uint8_t col);
void vga_print_colored(const char* string, vga_color_t color); void vga_print_colored(const char* string, vga_color_t color);