home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 12 / CD_ASCQ_12_0294.iso / vrac / pclcjs.zip / CLEAR.C < prev    next >
C/C++ Source or Header  |  1993-01-14  |  352b  |  28 lines

  1. /* Test of new clearscreen function */
  2.  
  3. #include <dos.h>
  4. #include "cjslib.h"
  5.  
  6.  
  7. int clear(int color)
  8.  
  9. {
  10.     union REGS regs;
  11.     
  12.     regs.h.ah=6;
  13.     regs.h.al=0;
  14.     regs.h.ch=0;
  15.     regs.h.cl=0;
  16.     regs.h.dh=screen_lines();
  17.     regs.h.dl=79;
  18.     regs.h.bh=color*16+7;
  19.     
  20.     if (regs.h.dh==0)
  21.         regs.h.dh=24;
  22.     
  23.     int86(0x10,®s,®s);
  24.     
  25.     return;
  26. }
  27.     
  28.