	SUBROUTINE GTTRM
	INTEGER LUN,MTSC(4)
C
C		Terminal initialization code
C
	TYPE 100
  100	FORMAT(1H0,'Terminal# = ',$)
	ACCEPT 200, LUN
  200	FORMAT(I)
	IF(MTATCH(LUN) .NE. 0)  STOP '?GTTRM-F-MTATCH failure'
	IF(MTGET(LUN,MTSC) .NE. 0)  STOP '?GTTRM-F-MTGET failure'
	MTSC(1) = MTSC(1) .AND. "177775		! No <CR><LF>
	IF(MTSET(LUN,MTSC) .NE. 0)  STOP '?GTTRM-F-MTSET failure'
	CALL LUNTRM(LUN)		!Tell TCFL which port to use
	RETURN
	END
