home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / prof_c / 05oslib / bios / clrscrn.c < prev    next >
Encoding:
C/C++ Source or Header  |  1988-08-11  |  633 b   |  27 lines

  1. /*
  2.  *    clrscrn -- clear the "visual" screen page
  3.  */
  4.  
  5. #include <dos.h>
  6. #include <local\std.h>
  7. #include <local\bioslib.h>
  8. #include <local\video.h>
  9.  
  10. int
  11. clrscrn(a)
  12. unsigned int a;    /* video attribute for new lines */
  13. {
  14.     union REGS inregs, outregs;
  15.  
  16.     inregs.h.ah = SCROLL_UP;
  17.     inregs.h.al = 0;        /* blank entire window */
  18.     inregs.h.bh = a;        /* use specified attribute */
  19.     inregs.h.bl = 0;
  20.     inregs.x.cx = 0;        /* upper left corner */
  21.     inregs.h.dh = Maxrow[Vmode] - 1;/* bottom screen row */
  22.     inregs.h.dl = Maxcol[Vmode] - 1;/* rightmost column */
  23.     int86(VIDEO_IO, &inregs, &outregs);
  24.  
  25.     return (outregs.x.cflag);
  26. }
  27.