home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c017 / 36.ddi / DBTOC.ZIP / SCROLLUP.C < prev    next >
Encoding:
C/C++ Source or Header  |  1987-10-05  |  1.0 KB  |  42 lines

  1. #include "\lc\header\dos.h"
  2.  
  3.  
  4. /*---------------------------------------------------------------------------
  5. SCROLLUP - Scroll Window Up
  6.  
  7.    no_lines = number of lines to scroll, =0 to blank the window
  8.    y1 = ch=row number of upper left corner
  9.    x1 = cl=column number of upper left corner
  10.    y2 = dh=row number of lower right corner
  11.    x2 = dl=column number of lower right corner
  12.    attr= bh=disp attribute for blank lines, see screen.h
  13.  
  14. --------------------------------------------------------------------------*/
  15.  
  16. int scrollup(y1,x1,y2,x2,no_l_ines,attr)
  17.  
  18. int x1,y1,x2,y2,no_l_ines,attr;
  19.  
  20. {
  21.  
  22. union REGSS inregs;
  23.  
  24. if(y1<0 || y2<y1 || y2>24 || x1<0 || x2<x1 || x2>79 || no_l_ines > 24 || no_l_ines < 0)
  25.    return(0);
  26.  
  27.  
  28. inregs.h.ah = (char)6;
  29. inregs.h.al = (char)no_l_ines;
  30. inregs.h.ch = (char)y1;         /*load registers */
  31. inregs.h.cl = (char)x1;
  32. inregs.h.dh = (char)y2;
  33. inregs.h.dl = (char)x2;
  34. inregs.h.bh = (char)attr;
  35.  
  36.       vidint(&inregs);           /* call BIOS video interrupt */
  37.  
  38. return(0);
  39.  
  40. }
  41.  
  42.