forked from PoliEcho-holding-org/kern
Added text cursor enable and disable
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user