Page 1 of 1

get and set cursor position in long mode

Posted: Wed May 18, 2011 11:17 am
by nicola
i've followed the articles on osdev wiki and successfully entered
long mode, however this long mode doesn't allow calling to BIOS
interrupts

so how to get and set cursor position (text screen) in long mode?
(like we used to use int 10h)

Re: get and set cursor position in long mode

Posted: Wed May 18, 2011 3:12 pm
by nicola
tks berkus

i found this article in osdev wiki http://wiki.osdev.org/Text_Mode_Cursor
which shows how to set cursor position in text 80x25 mode but
it doesn't suggest how to read cursor position

any useful links?

Re: get and set cursor position in long mode

Posted: Wed May 18, 2011 3:44 pm
by gerryg400
Do you really need to read the cursor position ? If you take over the cursor, your program will always know where it last put the cursor.

Re: get and set cursor position in long mode

Posted: Wed May 18, 2011 3:50 pm
by nicola
yeah, but then i have to store the cursor position in my program's memory
i just don't want to let everything be confused between 2 locations storing the same values
so there must be some similar method as setting cursor position in the osdev wiki article?

Re: get and set cursor position in long mode

Posted: Wed May 18, 2011 4:09 pm
by Combuster
I suggest you start reading VGA documentation. If you can write a register, you can just as well read it. It just requires some effort from your side to figure out the details, and well within the required programming qualities for this forum.

That said, writing vga registers is slow, reading vga registers is even slower. You want to touch them as little as possible so keeping a local copy is a whole factor faster.