Category : C Source Code
Archive   : WTWG12B.ZIP
Filename : WCURSOR.C

 
Output of file : WCURSOR.C contained in archive : WTWG12B.ZIP
/*! wcursor
*
*
* turn cursor on or off
*
* use : 1 = ON turns cursor on
* 0 = OFF turns cursor off
*
*/
#include "wscreen.h"
#include "wsys.h"


#include



void wcursor(int want_cursor)
{
int row, col, page;

PSEUDOREGS;




#ifndef TEXTONLY

if (wmode == 'G')
{
return;
}

#endif /* TEXTONLY */




if (want_cursor == ON)
{
w0-> winflag |= WFL_CURSOR;

/* move the physical cursor to the logical location
* NOTE that using TurboC's pseudoregs
* means all far * calculations have to
* be done before loading regs.
*/
page = w0-> winpage;
col = w0-> winleft +w0->winx;
row = w0-> wintop +w0->winy;
_DH = row;
_DL = col;
_BH = page;
_AH = 2; /* function to set cursor position */
INTERRUPT(0x10);

/*load new cursor size
*/
_CX = wcurscanln;

_AH = 1; /* indicates cursor size request */
INTERRUPT (0x10);



}

else /* want_cursor OFF */
{
w0-> winflag &= (0xff - WFL_CURSOR);

_CH = 0x2E; /* stop cursor */
_CL = 0x20;
_AH = 1;
INTERRUPT (0x10);
}

return;
} /*end wcursor routine */








  3 Responses to “Category : C Source Code
Archive   : WTWG12B.ZIP
Filename : WCURSOR.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/