/* * scroll.h * ***************************************************************************** * * Scrolling in Text mode ( DOS ) * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ***************************************************************************** * * Author : Rajesh _ThE gReAt * Built on : some time in 2k * Last Modified on : Friday, February 15, 2002, 11:53:36 PM * * Known errors : ---===(none)===--- * ***************************************************************************** * DISCLAIMER: ***************************************************************************** * * Programmers may incorporate any or all code into their programs, * giving proper credit within the source. Publication of the * source routines is permitted so long as proper credit is given * to Rajesh _ThE gReAt. * * Copyright (C) 2002, 2003 by Rajesh _ThE gReAt. You may use this program, or * code or tables extracted from it, as desired without restriction. * I can not and will not be held responsible for any damage caused from * the use of this software. * * Read license.txt from http://www.rajeshgoli.com/license.txt * or http://www.rajeshgoli.com/license.htm * before using / distributing / or any sort of use of my source * Also read my disclaimer http://www.rajeshgoli.com/disclaimer.htm * * YOU AGREE TO BE BOUND BY MY DISCLAIMER AND LICENSE BY IN ANY WAY * USING THIS FILE . * ***************************************************************************** * This source works with Turbo C 2.0 and Turbo C++ 3.0 and above. ***************************************************************************** * Rajesh _ThE gReAt is a synonym of Rajesh Goli * Source freely distributable *****************************************************************************/ #ifndef __SCROLL_H #define __SCROLL_H #endif #ifndef __DOS_H #include #endif void scrolldown( int , int , int , int ,int ); void scrollup( int , int , int , int ,int ); void scrolldown( int start_row , int start_column , int end_row , int end_column ,int attrb) { union REGS workregs; workregs.h.ah = 7; /* Service Number */ workregs.h.al = 1; /* Number of lines to scroll */ workregs.h.ch = start_row; workregs.h.cl = start_column; workregs.h.dh = end_row; workregs.h.dl = end_column; workregs.h.bh = attrb; /* Display attribute of blank line created at top */ int86(0x10,&workregs,&workregs); } void scrollup( int start_row , int start_column , int end_row , int end_column ,int attrb) { union REGS workregs; workregs.h.ah = 6; /* Service Number */ workregs.h.al = 1; /* Number of lines to scroll */ workregs.h.ch = start_row; workregs.h.cl = start_column; workregs.h.dh = end_row; workregs.h.dl = end_column; workregs.h.bh = attrb; /* Display attribute of blank line created at top */ int86(0x10,&workregs,&workregs); }