home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 26
/
CD_ASCQ_26_1295.iso
/
vrac
/
user_int.zip
/
SCROLL.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1995-07-30
|
985b
|
40 lines
#include <dos.h>
//#define SCROLL_UP 0
//#define SCROLL_DN 1
void scroll(int direction,
int num_lines,
int vattrib,
int ulrow,
int ulcomumn,
int lrrow,
int lrcolumn)
{
union REGS regs;
// AL = number of lines to scroll //
// BH = attribute to be used on blank line //
// CH = row of upper left corner of scroll window //
// CL = column of upper left corner of scroll window //
// DH = row of lower right corner of scroll window //
// DL = column of lower right corner of scroll window //
// AH = direction to scroll //
regs.h.al = (unsigned char)num_lines;
regs.h.bh = (unsigned char)vattrib;
regs.h.ch = (unsigned char)ulrow;
regs.h.cl = (unsigned char)ulcomumn;
regs.h.dh = (unsigned char)lrrow;
regs.h.dl = (unsigned char)lrcolumn;
if (direction == 0) // up //
{ regs.h.ah = 0x06;
}
else
{ regs.h.ah = 0x07; // down //
}
int86(0x10, ®s, ®s);
}