home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c065 / 1.ddi / CLIB1.ZIP / CLRSCR.C < prev    next >
Encoding:
C/C++ Source or Header  |  1990-06-07  |  1.6 KB  |  48 lines

  1. /*------------------------------------------------------------------------
  2.  * filename - clrscr.c
  3.  *
  4.  * function(s)
  5.  *        clrscr - clears text mode window
  6.  *-----------------------------------------------------------------------*/
  7.  
  8. /*[]------------------------------------------------------------[]*/
  9. /*|                                                              |*/
  10. /*|     Turbo C Run Time Library - Version 3.0                   |*/
  11. /*|                                                              |*/
  12. /*|                                                              |*/
  13. /*|     Copyright (c) 1987,1988,1990 by Borland International    |*/
  14. /*|     All Rights Reserved.                                     |*/
  15. /*|                                                              |*/
  16. /*[]------------------------------------------------------------[]*/
  17.  
  18.  
  19. #include <_video.h>
  20. #include <conio.h>
  21.  
  22. /*------------------------------------------------------------------------*
  23.  
  24. Name        clrscr - clears text mode window
  25.  
  26. Usage        void clrscr(void);
  27.  
  28. Prototype in    conio.h
  29.  
  30. Description    clrscr clears the current text window and places the cursor
  31.                 in the upper left-hand corner(at position 1,1).
  32.  
  33. Return value    None
  34.  
  35. *--------------------------------------------------------------------------*/
  36. void clrscr(void)
  37. {
  38.  
  39.     __scroll(UP, _video.windowx1, _video.windowy1,
  40.              _video.windowx2, _video.windowy2, 0);
  41.  
  42.     _DL = _video.windowx1;        /* position to window 1,1 */
  43.     _DH = _video.windowy1;
  44.     _AH = V_SET_CURSOR_POS;
  45.     _BH = 0;
  46.     _VideoInt();
  47. }
  48.