How can I do cursor control with ANSI using escape sequences using Turbo C? Here I’ve provided a code, but it’s not yet working in my TurboC.
main()
{
while( getche() != '.' )
printf("\x1B[B");
}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Apart from the possibility that that output may be line buffered (meaning nothing may appear until you send a newline), you should probably also ensure that
ANSI.SYSis loaded, since it’s the device driver responsible for interpreting those sequences.But I’m wondering why you’re doing this. From memory (admittedly pretty faded memory), Turbo C has calls for doing this sort of thing,
gotoXYandclrscrand such.