home *** CD-ROM | disk | FTP | other *** search
- /**
- *
- * Name sccurst -- Returns the cursor position and size from
- * current display page
- *
- * Synopsis is_off = sccurst(prow,pcol,phigh,plow);
- *
- * int is_off 1 if cursor is off, 0 if on
- * int *prow Pointer to row value returned
- * int *pcol Pointer to column value returned
- * int *phigh Pointer to high scan line returned
- * int *plow Pointer to low scan line returned
- *
- * Description SCCURST returns the current cursor location on the
- * current display device and page and the current size of
- * the cursor. It also reports whether the cursor is on or
- * off.
- *
- * Blaise C TOOLS do not record cursor sizes and on/off
- * states for inactive display pages. That is, the cursor
- * size for the active page also applies to all inactive
- * pages.
- *
- * This function operates by querying BIOS about the status
- * of the cursor. Some IBM programs alter the cursor size
- * without alerting BIOS about the change, so the BIOS may
- * report inaccurate information about cursor size.
- * SCCURST is subject to such inaccuracies.
- *
- * Returns is_off 1 if cursor is off, 0 if on
- * *prow,*pcol,*phigh,*plow
- *
- * Version 6.00 (C)Copyright Blaise Computing Inc. 1986,1987,1989
- *
- **/
-
- #include <dos.h>
-
- #include <bscreens.h>
-
- int sccurst(prow,pcol,phigh,plow)
- int *prow,*pcol,*phigh,*plow;
- {
- union REGS inregs,outregs; /* Registers for BIOS call */
-
- inregs.h.ah = 0x03; /* Set up the call to the BIOS */
- inregs.h.bh = (unsigned char) b_curpage;
-
- int86(SC_BIOS_INT,&inregs,&outregs);
-
- *prow = outregs.h.dh;
- *pcol = outregs.h.dl;
- *phigh = utlonyb(outregs.h.ch); /* Use actual values. */
- *plow = utlonyb(outregs.h.cl);
-
- return ((outregs.h.ch & 0x60) != 0);
- }