home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c005 / 4.ddi / C / SCCURSET.C < prev    next >
Encoding:
C/C++ Source or Header  |  1986-08-05  |  1.2 KB  |  45 lines

  1. /**
  2. *
  3. * Name        sccurset -- Set the cursor position on the current
  4. *                display page.
  5. *
  6. * Synopsis    cpos = sccurset(row,col);
  7. *
  8. *        int cpos;      Return position (row,col)
  9. *        int row;      row position
  10. *        int col;      column position
  11. *
  12. * Description    SCCURSET sets the cursor to the position specified by
  13. *        row and col on the current page.  The current page must
  14. *        be the same as the active display page (i.e., currently
  15. *        displayed) for the cursor to be seen to move.
  16. *
  17. * Returns    cpos          The cursor position with the row
  18. *                  in the high order byte and the column
  19. *                  in the low order byte.
  20. *
  21. * Version    3.0 (C)Copyright Blaise Computing Inc. 1983, 1984, 1986
  22. *
  23. **/
  24.  
  25. #include <bscreen.h>
  26.  
  27. int sccurset(row,col)
  28. int row,col;
  29. {
  30.    int ax,bx,cx,dx,flags;          /* General registers          */
  31.    int mode,columns,act_page;
  32.  
  33.    scmode(&mode,&columns,&act_page);
  34.    utbound(row,0,scrows() - 1)          /* Force reasonable values      */
  35.    utbound(col,0,columns-1)
  36.  
  37.    ax  = utbyword(2,0);           /* Set up call to the BIOS      */
  38.    bx  = utbyword(b_curpage,0);
  39.    dx  = utbyword(row,col);
  40.  
  41.    bios(16,&ax,&bx,&cx,&dx,&flags);
  42.  
  43.    return(utbyword(row,col));
  44. }
  45.