delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1992/07/07/03:11:11

Date: Tue, 7 Jul 1992 00:00:26 -0700
From: wweston AT steer DOT sdsu DOT edu (stewart k)
To: djgpp AT sun DOT soe DOT clarkson DOT edu

Greetings once again,
	My solution to the scroll problem using insline() and delline():


/*
	if lines==0, clears screen. If lines >0, scrols up.	If lines is
negative scrols down.

*/

void
scrol_u_d( int lines, int x1, int y1, int x2, int y2,int attrib )
{
	union REGS reg;

	if ( lines < 0 ) /*scrol down*/

		reg.x.ax = ( 7 << 8 ) + lines*( -1 );

	else /*scrol up*/

		reg.x.ax = ( 6 << 8 ) + lines;

	reg.h.bh = attrib;
	reg.x.cx = ( y1 << 8 ) + x1;
	reg.x.dx = ( y2 << 8 ) + x2;
	int86( 0X10, &reg, &reg );
}
						Wes

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019