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

  1. /**
  2. *
  3. * Name        sccurpos -- Returns the cursor position for the current
  4. *            display page.
  5. *
  6. * Synopsis    cpos = sccurpos(prow,pcol);
  7. *
  8. *        int cpos      Returned position (row,col)
  9. *        int *prow      Pointer to row value returned
  10. *        int *pcol      Pointer to column value returned
  11. *
  12. * Description    SCCURPOS returns the current cursor location on the
  13. *        current display page.
  14. *
  15. * Returns    cpos          The cursor position with the row
  16. *                  in the high order byte and the column
  17. *                  in the low order byte.
  18. *        *prow,*pcol
  19. *
  20. * Version    3.0 (C)Copyright Blaise Computing Inc. 1983, 1984, 1986
  21. *
  22. **/
  23.  
  24. #include <bscreen.h>
  25.  
  26. int sccurpos(prow,pcol)
  27. int *prow,*pcol;
  28. {
  29.    int ax,bx,cx,dx,flags;           /* General registers           */
  30.  
  31.    ax  = utbyword(3,0);            /* Set up the call to the BIOS  */
  32.    bx  = utbyword(b_curpage,0);
  33.  
  34.    bios(16,&ax,&bx,&cx,&dx,&flags);
  35.  
  36.    *prow = uthibyte(dx);
  37.    *pcol = utlobyte(dx);
  38.  
  39.    return(utbyword(*prow,*pcol));
  40. }
  41.