Category : C Source Code
Archive   : C-ALL.ZIP
Filename : TI712.ASC

 
Output of file : TI712.ASC contained in archive : C-ALL.ZIP







PRODUCT : Borland C++ NUMBER : 712
VERSION : 2.0
OS : DOS
DATE : September 18, 1991 PAGE : 1/2

TITLE : Cursor Control Functions




These functions permit cursor control using the DOS Services.
They are not guaranteed to work on any given setup.

The bottom line is: if they work for you, GREAT!

/**********************************************************************/
#include

int CURSOR = 7;

/**********************************************************************/
/* Routine turns off the cursor on the default screen.
*/
/**********************************************************************/
void cursor_off(void)
{
union REGS regs;
regs.x.ax = 0x0100;
regs.x.cx = 0x2000;
int86 (0x10, ®s, ®s);
}
/**********************************************************************/
/* Routine turns on the cursor on the default screen.
*/
/**********************************************************************/
void cursor_on(void)
{
union REGS regs;
regs.x.ax = 0x0100;
regs.h.ch = CURSOR - 1;
regs.h.cl = CURSOR;
int86 (0x10, ®s, ®s);
}























PRODUCT : Borland C++ NUMBER : 712
VERSION : 2.0
OS : DOS
DATE : September 18, 1991 PAGE : 2/2

TITLE : Cursor Control Functions




/**********************************************************************/
/* Routine changes the cursor size on the default screen.
*/
/**********************************************************************/
void cursor_size(int lo, int hi)
{
union REGS regs;
regs.h.ah = 0x0001;
regs.h.ch = lo;
regs.h.cl = hi;
int86 (0x10, ®s, ®s);
}

/**********************************************************************/
/* Routine to test the cursor functions.
*/
/**********************************************************************/
#include
void main(void)
{
int i;
printf("Changing cursor size: ");
for (i=0; i<11; i++)
{
cursor_size(0,i);
delay(250);
}
cursor_size(6,7);
printf("\nThe cursor should be off!\n");
cursor_off();
sleep(3);
cursor_on();
printf("The cursor should be on!\n");
}

















  3 Responses to “Category : C Source Code
Archive   : C-ALL.ZIP
Filename : TI712.ASC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/