home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / screen / scrn02 / vscroll.c < prev    next >
Encoding:
C/C++ Source or Header  |  1987-03-19  |  1.4 KB  |  47 lines

  1. /*    TITLE    vscroll.c
  2. *    AUTHOR    Tim Spencer - Compuserve [73657,1400]
  3. *    DATE    March 13, 1987
  4. */
  5.  
  6.  
  7. #include "dos.h"
  8. #include "video.h"
  9.  
  10. /* scroll all or part of screen up by nrows    */
  11.  
  12. void vid_up(nrows, left, right, top, bottom, attrib)
  13.  int nrows;            /* number of rows up */     
  14.  int left, right;        /* left/right boundries */
  15.  int top, bottom;        /* top/bottom boundries */
  16.  int attrib;            /* attribute to put in the scrolled area */
  17.  {
  18.    union REGS inregs , outregs ;
  19.  
  20.    inregs.x.ax = nrows ;
  21.    inregs.h.bh = (char)attrib;
  22.    inregs.x.cx = top << 8 | left;         /* ch=top , cl=left  */
  23.    inregs.x.dx = bottom << 8 | right ;       /* dh=bottom , dl=right */
  24.    inregs.h.ah = V_SCRLUP;
  25.    int86(VID_INT,&inregs,&outregs) ;
  26.  }
  27.  
  28.  
  29.  
  30. /* scroll all or part or screen down by nrows    */
  31.  
  32. void vid_down(nrows, left, right, top, bottom, attrib) 
  33.  int nrows ;               /* number of rows down */
  34.  int left, right;        /* left/right boundries */
  35.  int top, bottom;        /* top/bottom boundries */
  36.  int attrib;            /* attribute to use */
  37.  {
  38.    union REGS inregs , outregs ;
  39.  
  40.    inregs.x.ax = nrows ;
  41.    inregs.h.bh = (char)attrib;
  42.    inregs.x.cx = top << 8 | left;              /* ch=from_row , cl=left  */
  43.    inregs.x.dx = bottom << 8 | right;          /* dh=thru_row , dl=right */
  44.    inregs.h.ah = V_SCRLDOWN;
  45.    int86(VID_INT,&inregs,&outregs) ;
  46.  }
  47.