aboutsummaryrefslogtreecommitdiff
path: root/include/02.vga/vga5.c
diff options
context:
space:
mode:
Diffstat (limited to 'include/02.vga/vga5.c')
-rw-r--r--include/02.vga/vga5.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/02.vga/vga5.c b/include/02.vga/vga5.c
new file mode 100644
index 0000000..79c5657
--- /dev/null
+++ b/include/02.vga/vga5.c
@@ -0,0 +1,15 @@
+void terminal_initialize(void)
+{
+ terminal_row=0;
+ terminal_column=0;
+ set_color(VGA_COLOR_LIGHT_GREY, VGA_COLOR_BLACK);
+ terminal_buffer=(uint16_t*) 0xB8000;
+ for(size_t y=0;y<VGA_HEIGHT;y++)
+ {
+ for(size_t x=0;x<VGA_WIDTH;x++)
+ {
+ const size_t index=y*VGA_WIDTH+x;
+ terminal_buffer[index]=vga_entry(' ', terminal_color);
+ }
+ }
+}