home *** CD-ROM | disk | FTP | other *** search
- /**
- *
- * Name sccurset -- Set the cursor position on the current
- * display page.
- *
- * Synopsis cpos = sccurset(row,col);
- *
- * int cpos; Return position (row,col)
- * int row; row position
- * int col; column position
- *
- * Description SCCURSET sets the cursor to the position specified by
- * row and col on the current page. The current page must
- * be the same as the active display page (i.e., currently
- * displayed) for the cursor to be seen to move.
- *
- * Returns cpos The cursor position with the row
- * in the high order byte and the column
- * in the low order byte.
- *
- * Version 6.00 (C)Copyright Blaise Computing Inc. 1983,1987,1989
- *
- **/
-
- #include <dos.h>
-
- #include <bscreens.h>
-
- int sccurset(row,col)
- int row,col;
- {
- union REGS inregs,outregs; /* Registers for BIOS call */
- int mode,columns,act_page;
-
- scmode(&mode,&columns,&act_page);
- utbound(row,0,scrows() - 1) /* Force reasonable values */
- utbound(col,0,columns-1)
-
- inregs.h.ah = 0x02; /* Set up call to the BIOS */
- inregs.h.bh = (unsigned char) b_curpage;
- inregs.h.dh = (unsigned char) row;
- inregs.h.dl = (unsigned char) col;
-
- int86(16,&inregs,&outregs);
-
- return (int) inregs.x.dx;
- }