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

  1. /*
  2.  *    clrw -- clear specified region of "visual" screen page
  3.  */
  4.  
  5. #include <dos.h>
  6. #include <local\std.h>
  7. #include <local\bioslib.h>
  8.  
  9. int
  10. clrw(t, l, b, r, a)
  11. int t;        /* top row of region to clear */
  12. int l;        /* left column */
  13. int b;        /* bottom row */
  14. int r;        /* right column */
  15. unsigned char a;/* attribute for cleared region */
  16. {
  17.     union REGS inregs, outregs;
  18.  
  19.     inregs.h.ah = SCROLL_UP;/* scroll visual page up */
  20.     inregs.h.al = 0;    /* blank entire window */
  21.     inregs.h.bh = a;    /* attribute of blank lines */
  22.     inregs.h.bl = 0;
  23.     inregs.h.ch = t;    /* upper left of scroll region */
  24.     inregs.h.cl = l;
  25.     inregs.h.dh = b;    /* lower right of scroll region */
  26.     inregs.h.dl = r;
  27.     int86(VIDEO_IO, &inregs, &outregs);
  28.  
  29.     return (outregs.x.cflag);
  30. }
  31.