i'm searching everywhere to learn how to find the console coord (x, y position) not give it new coord, just find out what the coordinates are for the cursor.
thanx in advance
i'm searching everywhere to learn how to find the console coord (x, y position) not give it new coord, just find out what the coordinates are for the cursor.
thanx in advance
¿Red Baron?
"Imagination is more important than knowledge"
-Albert Einstein (1879-1955)
Check out my games!
[code] /* dont forget code tags! */ [/code]
Ive dont this in ASM before, ive posted the code below incase it helps.
The other way of doing it in dos is to use interupt 10, 3 (though i havent used this method before). Heres a discription of how to use it:Code:mov dx, 0x03D4 ;Get Cursor Position MSB mov al, 0x0E out dx, al mov dx, 0x03D5 in al, dx shl ax, 8 ;Store MSB in ah mov dx, 0x03D4 ;Get Cursor Position LSB mov al, 0x0F out dx, al mov dx, 0x03D5 in al, dx ;Store LSB in al mov bh, 80 ;Divide to get XY coordinates (X in ah and Y in al) div bh xchg ah, al ;The Y coordinate must be first and the X coordinate last
Code:Int 10 AH = 0x03 BH = Video page - probably 0 On return: DH = Y co-ord DL = X co-ord
VC++ 6
You can use ansi escape codes to save the cursor position.
Quzah.
Hope is the first step on the road to disappointment.
Well not really, because the method i used (the first one) actually reads the graphic controllers curser position so will work in any OS (actually i did it in the absence of an OS).
VC++ 6
Oh really? On a SUN system? On an Alpha? On a ...Originally posted by VBprogrammer
Well not really, because the method i used (the first one) actually reads the graphic controllers curser position so will work in any OS (actually i did it in the absence of an OS).
Quzah.
Hope is the first step on the road to disappointment.
i'll try some of the stuff you guys suggested, all i need it for is windows, thanx for the help so far
¿Red Baron?
"Imagination is more important than knowledge"
-Albert Einstein (1879-1955)
Check out my games!
[code] /* dont forget code tags! */ [/code]
Did I miss something..? When did assembler become portable?Originally posted by VBprogrammer
Well not really, because the method i used (the first one) actually reads the graphic controllers curser position so will work in any OS (actually i did it in the absence of an OS).
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
i've ready the ansi escape codes and i'm pretty sure this is what i need
but i'm not sure how to use this, any help?ESC[s
Save Cursor Position: Saves the current cursor position. You can move
the cursor to the saved cursor position by using the Restore Cursor
Position sequence.
ps thanx VBprogrammer for the code but i have no idea how to use asm or the code you posted.
¿Red Baron?
"Imagination is more important than knowledge"
-Albert Einstein (1879-1955)
Check out my games!
[code] /* dont forget code tags! */ [/code]