turboc - clrscr() & gotoxy() functions
MJSchmelzer
xmjschm at hscfvax.harvard.edu
Sat Dec 3 03:47:40 AEST 1988
In article <1045 at naucse.UUCP> wew at naucse.UUCP (Bill Wilson) writes:
>From article <3ff17f35.7183 at apollo.COM>, by landry at apollo.COM (Chris Landry):
>> Does TurboC allow screen functions like...
>> clrscr(); gotoxy(x,y); clreol(); etc?
>
>Prior to version 1.5 you had to write all of your own graphics
>primitives.
Here are the graphics primitives I used for TurboC 1.0 :
void cls()
{
union REGS r;
r.h.ah=6;
r.h.al=0;
r.h.ch=0;
r.h.cl=0;
r.h.dh=24;
r.h.dl=79;
r.h.bh=7;
int86(0x10, &r, &r);
}
void move_to (row, col)
int row;
int col;
{
union REGS r;
r.h.ah=2;
r.h.dh=row;
r.h.dl=col;
r.h.bh=0;
int86(0x10, &r, &r);
}
--
============== xmjschm at harvspha.BITNET ============= "Your soul is mine,
Mike Schmelzer xmjschm at hscfvax.harvard.edu fork it over."
===================================================== - Salem 66
More information about the Comp.lang.c
mailing list