home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_122 / 1.ddi / CLIBSRC.ZIP / CLRSCR.C < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  1.2 KB  |  46 lines

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