Disabling the VGA cursor

pull/25/head
E. Almqvist 3 years ago
parent e05eb80863
commit d2bcea854b
  1. 4
      src/kernel/kernel.c
  2. 13
      src/kernel/lib/vga.c

@ -1,8 +1,8 @@
#include "lib/vga.c"
#include <string.h>
void main() {
clear_screen();
vga_init();
set_cursor_pos(28, 2);
print("eOS Version 0.1 2021", 0xf0);
}

@ -1,4 +1,5 @@
// VGA Graphics Library
#include <sys/io.h>
// VGA base address: 0xb8000
// Charpos = 0xb8000 + 2(row*80 + col)
@ -34,6 +35,11 @@ void clear_screen() {
*c = 0x20;
}
void disable_cursor() {
outb(0x3d4, 0x0a);
outb(0x3d5, 0x20);
}
/*
General Printing Functions
@ -52,3 +58,10 @@ void println(char* str, int colorcode) {
print(str, colorcode);
cursor_row++; // Increment to next y-pos (newline)
}
// VGA Initialization Function
void vga_init() {
disable_cursor();
clear_screen();
}

Loading…
Cancel
Save