From 30d6e8f850d2fe26fffdeef0c38fc627ef8bab9a Mon Sep 17 00:00:00 2001 From: "Anna (navi) Figueiredo Gomes" Date: Wed, 13 Dec 2023 13:24:48 +0100 Subject: initial commit currently with: booted via multiboot 1 protected mode to long mode boostrap code vga used for outputting gdt and idt set up identity paging for the whole memory reported by multiboot pic and ps/2 set up acpi code exists but is broken --- include/vga.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 include/vga.h (limited to 'include/vga.h') diff --git a/include/vga.h b/include/vga.h new file mode 100644 index 0000000..6d74671 --- /dev/null +++ b/include/vga.h @@ -0,0 +1,38 @@ +#ifndef _VGA_H_ +#define _VGA_H_ + +#include +#include + +/* Hardware text mode color constants. */ +enum vga_color { + VGA_BLACK = 0, + VGA_BLUE = 1, + VGA_GREEN = 2, + VGA_CYAN = 3, + VGA_RED = 4, + VGA_MAGENTA = 5, + VGA_BROWN = 6, + VGA_LIGHT_GREY = 7, + VGA_DARK_GREY = 8, + VGA_LIGHT_BLUE = 9, + VGA_LIGHT_GREEN = 10, + VGA_LIGHT_CYAN = 11, + VGA_LIGHT_RED = 12, + VGA_LIGHT_MAGENTA = 13, + VGA_LIGHT_BROWN = 14, + VGA_WHITE = 15, +}; + +static const size_t VGA_WIDTH = 80; +static const size_t VGA_HEIGHT = 25; + +void vga_init(void); +void vga_putn(const size_t num); +void vga_putx(const size_t hex); +void vga_putc(const char c); +void vga_puts(const char *s); +void vga_putsn(const char *s, const size_t len); +void vga_set_color(const uint8_t fg, const uint8_t bg); + +#endif -- cgit v1.2.3