Need help with MS-DOS cursor functions

John Gordon gordon at osiris.cso.uiuc.edu
Fri Nov 2 04:25:41 AEST 1990


	Here you go.


/******************
*  cursor.c
******************/

#include <stdio.h>
#include <dos.h>

void cursor_on(void)  /* turns the cursor off, using an interrupt */
{
  union REGS r;

  r.h.ah = 1;         /* 1 is the cursor-modifying portion of structure r */
  r.h.ch = 6;         /* starting scan line for cursor */
  r.h.cl = 7;         /* ending scan line */

  int86(0x10, &r, &r);
}

void cursor_off(void)  /* turns the cursor on, using an interrupt */
{
  union REGS r;

  r.h.ah = 1;          /* 1 is the cursor-modifying portion of structure r */
  r.h.ch = -1;         /* starting scan line (neg. means turn off) */
  r.h.cl = 0;          /* ending scan line */

  int86(0x10, &r, &r);
}


---
John Gordon
Internet: gordon at osiris.cso.uiuc.edu        #include <disclaimer.h>
          gordon at cerl.cecer.army.mil       #include <clever_saying.h>
GEnie:    j.gordon14                  



More information about the Comp.lang.c mailing list