I have been working on moving the text mode cursor in the operating system I am currently developing. I am having trouble getting it to show up at all. Here is the code that
You select wrong VGA registers. You have to use 0x0F for low and 0x0E for high (you have 0x0A for both).
Edit: In case your cursor is disabled, this is how to enable it:
void enable_cursor() {
outb(0x3D4, 0x0A);
char curstart = inb(0x3D5) & 0x1F; // get cursor scanline start
outb(0x3D4, 0x0A);
outb(0x3D5, curstart | 0x20); // set enable bit
}
Also check this link for list of register numbers and usages.
Edit2: Your cursor location variable is not wide enough to store the cursor location. unsigned char cursor_loc should be unsigned short cursor_loc.