home *** CD-ROM | disk | FTP | other *** search
- /* TITLE vscroll.c
- * AUTHOR Tim Spencer - Compuserve [73657,1400]
- * DATE March 13, 1987
- */
-
-
- #include "dos.h"
- #include "video.h"
-
- /* scroll all or part of screen up by nrows */
-
- void vid_up(nrows, left, right, top, bottom, attrib)
- int nrows; /* number of rows up */
- int left, right; /* left/right boundries */
- int top, bottom; /* top/bottom boundries */
- int attrib; /* attribute to put in the scrolled area */
- {
- union REGS inregs , outregs ;
-
- inregs.x.ax = nrows ;
- inregs.h.bh = (char)attrib;
- inregs.x.cx = top << 8 | left; /* ch=top , cl=left */
- inregs.x.dx = bottom << 8 | right ; /* dh=bottom , dl=right */
- inregs.h.ah = V_SCRLUP;
- int86(VID_INT,&inregs,&outregs) ;
- }
-
-
-
- /* scroll all or part or screen down by nrows */
-
- void vid_down(nrows, left, right, top, bottom, attrib)
- int nrows ; /* number of rows down */
- int left, right; /* left/right boundries */
- int top, bottom; /* top/bottom boundries */
- int attrib; /* attribute to use */
- {
- union REGS inregs , outregs ;
-
- inregs.x.ax = nrows ;
- inregs.h.bh = (char)attrib;
- inregs.x.cx = top << 8 | left; /* ch=from_row , cl=left */
- inregs.x.dx = bottom << 8 | right; /* dh=thru_row , dl=right */
- inregs.h.ah = V_SCRLDOWN;
- int86(VID_INT,&inregs,&outregs) ;
- }