Category : C Source Code
Archive   : WINDOW_C.ZIP
Filename : W_CURSOR.C

 
Output of file : W_CURSOR.C contained in archive : WINDOW_C.ZIP
/* w_cursor.c -- part of Windows package; contains w_putcrs, crs_off, crs_on */

#include
#include "windows.h"

void w_putcrs(w)
Window *w;
{
union REGS r;

r.h.ah = 15; /* get video mode (to determine active page) */
int86(0x10, &r, &r);
r.h.dh = w->cursor.row + w->rect.top;
r.h.dl = w->cursor.col + w->rect.left;
r.h.ah = 2; /* set cursor position */
int86(0x10, &r, &r);
}

/****************************************************************************/
/* Turn off the cursor display. */
/****************************************************************************/

void crs_off()
{
union REGS r;

r.h.ah = 3;
r.h.bh = 0; /* using page 0 */
int86 (0x10, &r, &r);
r.h.ch |= 0x20;
r.h.ah = 1;
r.h.bh = 0; /* page 0 */
int86 (0x10, &r, &r);
}

/****************************************************************************/
/* Turn the cursor display back on. */
/****************************************************************************/

void crs_on()
{
union REGS r;

r.h.ah = 3;
r.h.bh = 0; /* using page 0 */
int86 (0x10, &r, &r);
r.h.ch &= 0xdf;
r.h.ah = 1;
r.h.bh = 0; /* page 0 */
int86 (0x10, &r, &r);
}



  3 Responses to “Category : C Source Code
Archive   : WINDOW_C.ZIP
Filename : W_CURSOR.C

  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/