home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / PIBMENU.ZIP / PIBSCROL.PAS < prev   
Encoding:
Pascal/Delphi Source File  |  1986-01-16  |  2.4 KB  |  53 lines

  1.  
  2. (*----------------------------------------------------------------------*)
  3. (*               Scroll --- Scroll section of screen                    *)
  4. (*----------------------------------------------------------------------*)
  5.  
  6. Procedure Scroll ( Y1, Y2, X1, X2, Nlines : Integer );
  7.  
  8. (*----------------------------------------------------------------------*)
  9. (*                                                                      *)
  10. (*   Procedure: Scroll                                                  *)
  11. (*                                                                      *)
  12. (*   Purpose:   Scrolls portion of screen.                              *)
  13. (*                                                                      *)
  14. (*   Calling sequence:                                                  *)
  15. (*                                                                      *)
  16. (*      Scroll( Y1, Y2, X1, X2, Nlines : Integer );                     *)
  17. (*                                                                      *)
  18. (*                                                                      *)
  19. (*                                                                      *)
  20. (*   Calls:  INTR                                                       *)
  21. (*                                                                      *)
  22. (*   Remarks:                                                           *)
  23. (*                                                                      *)
  24. (*      The indicated portion of the screen is scrolled up or down.     *)
  25. (*      If Nlines > 0, then the screen is scrolled up.  If Nlines < 0,  *)
  26. (*      the screen is scrolled down.  Setting Nlines to zero blanks     *)
  27. (*      the entire region.                                              *)
  28. (*                                                                      *)
  29. (*                                                                      *)
  30. (*----------------------------------------------------------------------*)
  31.  
  32. Var
  33.   Reg: Regpack;
  34.  
  35. Begin (* Scroll *)
  36.  
  37.    Reg.Cl := Y1;
  38.    Reg.Ch := X1;
  39.  
  40.    Reg.Dl := Y2;
  41.    Reg.Dh := X2;
  42.  
  43.    Reg.Bx := 0;
  44.  
  45.    If Nlines >= 0 Then
  46.       Reg.Ax := $0600 OR Nlines
  47.    Else
  48.       Reg.Ax := $0700 OR ABS( Nlines );
  49.  
  50.   INTR( $10 , Reg );
  51.  
  52. End  (* Scroll *);
  53.