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

  1. /**
  2. *
  3. * Name        scrows -- Return the number of character rows on the
  4. *              screen
  5. *
  6. * Synopsis    rows = scrows();
  7. *
  8. *        int rows      Returned number of rows
  9. *
  10. * Description    SCROWS returns the number of character rows on the
  11. *        screen, taking into account the possible presence of an
  12. *        Enhanced Graphics Adapter.
  13. *
  14. *        Use SCMODE to find the number of text columns.
  15. *
  16. * Returns    rows          Number of rows
  17. *
  18. * Version    3.0 (C)Copyright Blaise Computing Inc.    1986
  19. *
  20. **/
  21.  
  22. #include <bscreen.h>
  23.  
  24. int scrows()
  25. {
  26.     int ax,bx,cx,dx,flags;          /* Registers for BIOS call      */
  27.  
  28.     if (!b_know_hw)
  29.     scequip();              /* Look for EGA              */
  30.     if (b_ega != ABSENT)
  31.     {
  32.     ax = 0x1130;
  33.     bx = 0;
  34.     bios(16,&ax,&bx,&cx,&dx,&flags);
  35.     return utlobyte(dx) + 1;
  36.     }
  37.  
  38.     return PC_ROWS;
  39. }
  40.