home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 428_02 / libsrc / scroll.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-13  |  692 b   |  28 lines

  1. /*
  2. ** scroll.c
  3. **
  4. ** Pictor, Version 1.51, Copyright (c) 1992-94 SoftCircuits
  5. ** Redistributed by permission.
  6. */
  7.  
  8. #include <dos.h>
  9. #include "pictor.h"
  10.  
  11. /*
  12. ** Scrolls or clears a portion of the screen.
  13. */
  14. void scroll(int lines,int top,int left,int height,int width)
  15. {
  16.     union REGS regs;
  17.  
  18.     regs.h.ah = (unsigned char)((lines > 0) ? 0x06 : 0x07);
  19.     regs.h.al = (unsigned char)((lines > 0) ? lines : (-lines));
  20.     regs.h.bh = (unsigned char)_PL_color;
  21.     regs.h.ch = (unsigned char)(top - 1);
  22.     regs.h.dh = (unsigned char)(top + (height - 2));
  23.     regs.h.cl = (unsigned char)(left - 1);
  24.     regs.h.dl = (unsigned char)(left + (width - 2));
  25.     int86(0x10,®s,®s);
  26.  
  27. } /* scroll */
  28.