#include "vga.h"
#include "stdint.h"
#include "io.h"


#define VGA_PORT_INDEX 0x3D4
#define VGA_PORT_DATA 0x3D5


void move_cursor(int x, int y) {
    uint16_t position = y * 80 + x; // Assuming 80 columns
    outb(0x3D4, 0x0E); // VGA register for high byte
    outb(0x3D5, (position >> 8) & 0xFF);
    outb(0x3D4, 0x0F); // VGA register for low byte
    outb(0x3D5, position & 0xFF);
}




void set_cursor_position(int x, int y) {
    uint16_t position = y * 80 + x; // 80 columns in VGA text mode
    outb(VGA_PORT_INDEX, 0x0E);
    outb(VGA_PORT_DATA, (position >> 8) & 0xFF);
    outb(VGA_PORT_INDEX, 0x0F);
    outb(VGA_PORT_DATA, position & 0xFF);
}


