1 	SUB VPW_SCROLL(      INTEGER Terminal_Type,	&
			     INTEGER Top_Line,		&
			     INTEGER Bot_line,		&
			     INTEGER Scroll_Control)
	!
	! This subroutine will set the VT100 scroll reqion for
	! the Vax Professionalworkstation tasks.  Input is the 
	! Terminal type, the the top and bot line defining the 
	! scrolling region, and the scroll_control word defining
	! smooth or jump scroll.
	!
	!		Control = 0	Set to jump scroll, reset Origin mode
	!			= 1	Set to slow scroll
	!			= 2	Set Origin mode
	!
	! The control bits are additive

	IF Terminal_Type >= 96		THEN	! Only do if VT100
	  ESC$=CHR$(27)				!
	  IF Scroll_Control = 0		THEN	!
	    Control$=ESC$+"[?4l"		! Set jump scroll
	    Origin$ =ESC$+"[?6l" 		! reset origin mode
	  END IF				!
	  IF (Scroll_Control AND 1%) = 1% THEN	!
	    Control$=ESC$+"[?4h"		! Set smooth scroll
	  END IF				!
	  IF (Scroll_Control AND 2%) = 2% THEN	! If 2 bit set
	    Origin$=ESC$+"[?6h"			! set origin mode
	  END IF				!

	  Window$=Esc$+"["+NUM$(Top_Line)+";"+NUM$(Bot_Line)+"r"
	  Window$=EDIT$(Window$,2%)		! Remove any spaces
	  PRINT Origin$;Window$;Control$;	!
	END IF					!
	END SUB					!