home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Shareware - Software Farm 2
/
wosw_2.zip
/
wosw_2
/
CPROG
/
CURSOR.ZIP
/
CURSOR.C
next >
Wrap
Text File
|
1990-12-28
|
940b
|
29 lines
/* CURSOR
*
* If there are no command line arguments the cursor state will be toggled.
* Any argument EXCEPT "off" will turn the cursor on.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <dos.h>
union REGS in, out;
main(int argc, char *argv[])
{
if(argc < 2) { /* No args = start toggle */
in.h.ah = 3; /* Get cursor scan lines */
in.h.bh = 0;
int86(0x10, &in, &out);
if(out.x.cx == 0x2000) in.x.cx = 0x0708; /* Toggle cursor */
else in.x.cx = 0x2000;
}
else if(!strcmp(argv[1], "off")) /* Was 'off' entered? */
in.x.cx = 0x2000; /* Yes, kill cursor */
else in.x.cx = 0x0708; /* No, turn cursor on */
in.h.ah = 1; /* function 1 */
int86(0x10, &in, &out); /* int 10 -- Set cursor scan lines */
}