Added text cursor enable and disable

This commit is contained in:
2024-03-11 21:15:32 +01:00
parent ac281835db
commit 963bfe7744
3 changed files with 17 additions and 4 deletions
+14
View File
@@ -1,5 +1,6 @@
#include "screen.h"
#include "stdint.h"
#include "system.h"
uint16_t cursor = 0;
@@ -79,3 +80,16 @@ uint16_t calcOffset(uint8_t col, uint8_t row) {
return row * COLS + col;
}
void enableCursor(uint8_t start, uint8_t end) {
outb(0x3d4, 0x0a); // Sending cursor start
outb(0x3d5, (inb(0x3d5) & 0xc0) | start);
outb(0x3d4, 0x0b); // Sending cursor end
outb(0x3d5, (inb(0x3d5) & 0xe0) | end);
}
void disableCursor() {
outb(0x3d4, 0x0a);
outb(0x3d4, 0x0b);
}