diff --git a/Makefile b/Makefile index 956ab1f..5b13a7e 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ os-image: bootloader/bootloader.bin kernel.bin kernel.bin: kernel/kernel_entry.o $(OBJ) gcc -o $@ $^ -Wl,--oformat=binary -ffreestanding -nostdlib -shared -Ttext 0x1000 -m32 -%.o : %.c +%.o : %.c ${HEADERS} gcc -fno-pie -m32 -Os -ffreestanding -c $< -o $@ %.o : %.asm diff --git a/TODO.md b/TODO.md index 8520c94..c9d8fa5 100644 --- a/TODO.md +++ b/TODO.md @@ -1,6 +1,4 @@ # TO DO - - Refactor Makefile - - Refactor file structure - Finish the book! - Multiboot support (for grub etc) - VGA Library (Graphics) diff --git a/drivers/vga.h b/drivers/vga.h new file mode 100644 index 0000000..b5f2517 --- /dev/null +++ b/drivers/vga.h @@ -0,0 +1,8 @@ +char* get_vga_charpos_pointer(unsigned int col, unsigned int row); +void writechar(char c, unsigned int col, unsigned int row, int colorcode); +void clear_screen(); +void disable_cursor(); +void set_cursor_pos(); +void print(); +void println(); +void vga_init(); diff --git a/kernel/kernel.c b/kernel/kernel.c index 36b9639..2d24fd9 100644 --- a/kernel/kernel.c +++ b/kernel/kernel.c @@ -1,3 +1,5 @@ +#include "../drivers/vga.h" + void main() { vga_init(); // Initialize the screen first // i.e. clear the screen et cetera.