Feat: Initital beggining of a CLI

This commit is contained in:
AfonsoCMSousa
2025-11-25 21:03:44 +00:00
parent b619b9ed1d
commit 403face1e6
3 changed files with 41 additions and 14 deletions
+12 -4
View File
@@ -309,7 +309,7 @@ static inline void outb(unsigned short port, unsigned char val) {
__asm__ volatile ("outb %0, %1" : : "a"(val), "Nd"(port));
}
static inline void __VGA_set_cursor(unsigned int column, unsigned int line) {
static inline void __VGA_set_cursor_internal(unsigned int column, unsigned int line) {
if (column >= VGA_WIDTH) column = VGA_WIDTH - 1;
if (line >= VGA_HEIGHT) line = VGA_HEIGHT - 1;
@@ -330,13 +330,21 @@ static inline void __VGA_set_cursor(unsigned int column, unsigned int line) {
text_pos.line = line;
}
static inline void __VGA_set_cursor_VGA_pos(_VGA_screen_space pos) {
__VGA_set_cursor(pos.column, pos.line);
static void __VGA_set_cursor_VGA_pos(_VGA_screen_space pos) {
__VGA_set_cursor_internal(pos.column, pos.line);
}
static inline _VGA_screen_space get_cursor_pos() {
static _VGA_screen_space get_cursor_pos() {
_VGA_screen_space __temp = {cursor_pos.column, cursor_pos.line};
return __temp;
}
void scursor(unsigned int column, unsigned int line) {
__VGA_set_cursor_internal(column, line);
}
#endif