REMOTE PROGRAMMING
4-20
do
{
ch = getch ();
if ((ch == 'q')||(ch =='Q'))
{ flushall(); exit(0); }
}
while(ch != ' ');
Erase(25,1);
}
/* ********************************************************************* */
void Erase (int row, int num) /* Erase num rows starting at row (requires
ansi.sys)*/
{
int i;
for (i = 0; i < num; i++,row++)
{
Gotoxy (row,0);
putch(27);
printf("[K");
}
}
/* ********************************************************************* */
void Printxy (int x, int y, int n, char *msg) /* print msg at (x,y) erasing n chars first */
{
int i;
Gotoxy (x,y);
for (i = 0; i <= n; i++) printf (" ");
Gotoxy (x,y);
printf (msg);
}
/* ********************************************************************* */
void Gotoxy (int row, int col) /* place the cursor at (row,col) (requires ansi.sys) */
{
putch(27); printf("[%d;%dH", row, col);
}