| Close | Back |
1 /*
2 * scroll.h
3 *
4 *****************************************************************************
5 *
6 * Scrolling in Text mode ( DOS )
7 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8 *****************************************************************************
9 *
10 * Author : Rajesh _ThE gReAt
11 * Built on : some time in 2k
12 * Last Modified on : Friday, February 15, 2002, 11:53:36 PM
13 *
14 * Known errors : ---===(none)===---
15 *
16 *****************************************************************************
17 * DISCLAIMER:
18 *****************************************************************************
19 *
20 * Programmers may incorporate any or all code into their programs,
21 * giving proper credit within the source. Publication of the
22 * source routines is permitted so long as proper credit is given
23 * to Rajesh _ThE gReAt.
24 *
25 * Copyright (C) 2002, 2003 by Rajesh _ThE gReAt. You may use this program, or
26 * code or tables extracted from it, as desired without restriction.
27 * I can not and will not be held responsible for any damage caused from
28 * the use of this software.
29 *
30 * Read license.txt from http://www.rajeshgoli.com/license.txt
31 * or http://www.rajeshgoli.com/license.htm
32 * before using / distributing / or any sort of use of my source
33 * Also read my disclaimer http://www.rajeshgoli.com/disclaimer.htm
34 *
35 * YOU AGREE TO BE BOUND BY MY DISCLAIMER AND LICENSE BY IN ANY WAY
36 * USING THIS FILE .
37 *
38 *****************************************************************************
39 * This source works with Turbo C 2.0 and Turbo C++ 3.0 and above.
40 *****************************************************************************
41 * Rajesh _ThE gReAt is a synonym of Rajesh Goli
42 * Source freely distributable
43 *****************************************************************************/
44
45 #ifndef __SCROLL_H
46 #define __SCROLL_H
47 #endif
48
49 #ifndef __DOS_H
50 #include<dos.h>
51 #endif
52
53 void scrolldown( int , int , int , int ,int );
54 void scrollup( int , int , int , int ,int );
55
56 void scrolldown( int start_row , int start_column , int end_row , int end_column ,int attrb)
57 {
58 union REGS workregs;
59
60 workregs.h.ah = 7; /* Service Number */
61 workregs.h.al = 1; /* Number of lines to scroll */
62 workregs.h.ch = start_row;
63 workregs.h.cl = start_column;
64 workregs.h.dh = end_row;
65 workregs.h.dl = end_column;
66 workregs.h.bh = attrb; /* Display attribute of blank line
67 created at top */
68
69 int86(0x10,&workregs,&workregs);
70 }
71
72 void scrollup( int start_row , int start_column , int end_row , int end_column ,int attrb)
73 {
74 union REGS workregs;
75
76 workregs.h.ah = 6; /* Service Number */
77 workregs.h.al = 1; /* Number of lines to scroll */
78 workregs.h.ch = start_row;
79 workregs.h.cl = start_column;
80 workregs.h.dh = end_row;
81 workregs.h.dl = end_column;
82 workregs.h.bh = attrb; /* Display attribute of blank line
83 created at top */
84
85 int86(0x10,&workregs,&workregs);
86 }
87