It's very simple to build a function like gotoxy() using a software interruption. The following code do this and it works fine in any compile running on DOS (like Turbo C and Visual C)
#include <stdio.h>
#include <conio.h>
#include <dos.h>
void gotoxy (int x, int y)
{ union REGS regs;
regs.h.ah = 2; /* cursor position */
regs.h.dh = y;
regs.h.dl = x;
regs.h.bh = 0; /* vÃdeo page #0 */
int86(0x10, ®s, ®s);
}
int main (void)
{ clrscr();
movetoxy(35,10);
printf("Hello\n");
return 0;
}
Willians Santos
Software Engineer
Brazil