; SETTERM TTNN:
; RESET TERMINAL CHARACTERISTICS WHEN THE USER LOGS OFF.
; THINGS WHICH ARE ALREADY SET BY "BYE" ARE OMITTED
.SETF ALL
.ONERR NOTERM
.SETS EXIT "EXIT"
.IFNDF P1 .SETS P1 ""
.IF P1 = "" .ASKS P1 Which terminal (DDnn:)
.SETS X P1[4:4]
.IF X = ":" .SETS P1 P1[1:4]
.GOTO 'P1'
;
;;;;;;;; THESE ARE THE UN-ASSIGNED PORTS.
;;;;;;;; THE RECEIVE SPEEDS ARE SET TO ZERO TO AVOID THE PROBLEM
;;;;;;;; WITH UN-TERMINATED CABLES PICKING UP NOISE & LOADING DOWN THE
;;;;;;;; SYSTEM WITH SPURIOUS INTERRUPTS.
.TT3:
.TT22:
.TT25:
.TT32:
.TT33:
.TT34:
.TT35:
SET /TERM='P1'377
SET /SPEED='P1'0:9600
.'EXIT'



; THE CONSOLE DECWRITER
.TT0:
SET /TERM='P1'LA36
.IF <EXSTAT> NE 1 .'EXIT'
SET /BUF='P1'132.
SET /NOCRT='P1'
SET /NOESCSEQ='P1'
SET /ECHO='P1'
SET /NOFORMFEED='P1'
SET /HFILL='P1'0
SET /NOHHT='P1'
;SET /NOHOLD='P1'
SET /LINES='P1'5.
SET /LOWER='P1'
SET /TYPEAHEAD='P1'
SET /NOVFILL='P1'
SET /NOWRAP='P1'
.'EXIT'

; THE Diablo typewriter
.TT4:
SET /TERM='P1'0
.IF <EXSTAT> NE 1 .'EXIT'
SET /BUF='P1'80.
SET /NOCRT='P1'
SET /NOESCSEQ='P1'
SET /ECHO='P1'
SET /FORMFEED='P1'
SET /HFILL='P1'0
SET /NOHHT='P1'
;SET /NOHOLD='P1'
SET /LINES='P1'66.
SET /LOWER='P1'
SET /SPEED='P1'300:300
SET /TYPEAHEAD='P1'
SET /NOVFILL='P1'
SET /NOWRAP='P1'
.'EXIT'

; THE VT-100'S
.TT1:
.TT2:
.TT5:
.TT7:
.TT10:
.TT11:
.TT12:
.TT14:
.TT15:
.TT30:
SET /TERM='P1'VT100
.IF <EXSTAT> NE 1 .'EXIT'
.; TURN OFF ALTERNATE KEYPAD MODE
.IFF ALL TCF 033,076
SET /BUF='P1'132.
SET /CRT='P1'
SET /NOESCSEQ='P1'
SET /ECHO='P1'
SET /NOFORMFEED='P1'
SET /HFILL='P1'0
SET /HHT='P1'
;SET /NOHOLD='P1'
SET /LINES='P1'24.
SET /LOWER='P1'
SET /SPEED='P1'9600:9600
SET /TYPEAHEAD='P1'
SET /NOVFILL='P1'
SET /NOWRAP='P1'
.'EXIT'

; THE HAZELTINES
.TT6:
.TT16:
.TT20:
.TT23:
.TT24:
.TT26:
.TT27:
SET /TERM='P1'200
.IF <EXSTAT> NE 1 .'EXIT'
SET /BUF='P1'80.
SET /CRT='P1'
SET /NOESCSEQ='P1'
SET /ECHO='P1'
SET /NOFORMFEED='P1'
SET /HFILL='P1'0
SET /NOHHT='P1'
;SET /NOHOLD='P1'
SET /LINES='P1'24.
SET /LOWER='P1'
SET /SPEED='P1'9600:9600
SET /TYPEAHEAD='P1'
SET /NOVFILL='P1'
SET /NOWRAP='P1'
.'EXIT'

; THE TEC TUBE
.TT13:
SET /TERM='P1'201
.IF <EXSTAT> NE 1 .'EXIT'
SET /BUF='P1'80.
SET /CRT='P1'
SET /NOESCSEQ='P1'
SET /ECHO='P1'
SET /NOFORMFEED='P1'
SET /HFILL='P1'0
SET /NOHHT='P1'
;SET /NOHOLD='P1'
SET /LINES='P1'24.
SET /LOWER='P1'
SET /SPEED='P1'9600:9600
SET /SPEED='P1'0:9600
SET /NOTYPEAHEAD='P1'
SET /NOVFILL='P1'
SET /NOWRAP='P1'
SET /SLAVE='P1'
.'EXIT'

; DIAL-IN MODEMS
.TT36:
.TT37:
.TT40:
SET /TERM='P1'0
.IF <EXSTAT> NE 1 .'EXIT'
SET /BUF='P1'80.
SET /NOCRT='P1'
SET /NOESCSEQ='P1'
SET /ECHO='P1'
SET /NOFORMFEED='P1'
SET /HFILL='P1'0
SET /NOHHT='P1'
;SET /NOHOLD='P1'
SET /LINES='P1'4.
SET /LOWER='P1'
SET /SPEED='P1'300:300
SET /TYPEAHEAD='P1'
SET /NOVFILL='P1'
SET /NOWRAP='P1'
.'EXIT'

; HARDWARE LAB
.TT17:
SET /TERM='P1'0
.IF <EXSTAT> NE 1 .'EXIT'
SET /BUF='P1'80.
SET /NOCRT='P1'
SET /NOESCSEQ='P1'
SET /ECHO='P1'
SET /NOFORMFEED='P1'
SET /HFILL='P1'5
SET /NOHHT='P1'
;SET /NOHOLD='P1'
SET /LINES='P1'5.
SET /LOWER='P1'
SET /SPEED='P1'9600:9600
SET /TYPEAHEAD='P1'
SET /NOVFILL='P1'
SET /NOWRAP='P1'
.'EXIT'

; THE LA-120
.TT21:
SET /TERM='P1'LA120
.IF <EXSTAT> NE 1 .'EXIT'
SET /BUF='P1'132.
SET /NOCRT='P1'
SET /NOESCSEQ='P1'
SET /ECHO='P1'
SET /FORMFEED='P1'
SET /HFILL='P1'0
SET /HHT='P1'
;SET /NOHOLD='P1'
SET /LINES='P1'66.
SET /LOWER='P1'
SET /SPEED='P1'2400:2400
SET /TYPEAHEAD='P1'
SET /NOVFILL='P1'
SET /NOWRAP='P1'
.'EXIT'

; the funny color tube (with non-standard back-space)
.TT31:
SET /TERM='P1'202
.IF <EXSTAT> NE 1 .'EXIT'
SET /BUF='P1'132.
SET /NOCRT='P1'
SET /NOESCSEQ='P1'
SET /ECHO='P1'
SET /NOFORMFEED='P1'
SET /HFILL='P1'0
SET /NOHHT='P1'
;SET /NOHOLD='P1'
SET /LINES='P1'5.
SET /LOWER='P1'
SET /SPEED='P1'9600:9600
SET /TYPEAHEAD='P1'
SET /NOVFILL='P1'
SET /NOWRAP='P1'
.'EXIT'


.; SET ALL TERMINAL CHARACTERISTICS
.ALL:
.SETT ALL
.SETS EXIT "RETURN"
.SETN TERM 0
.SETN MAX 40
.NEXT:
.SETS P1 "TT"+"'TERM'"+":"
;    'P1'
.GOSUB 'P1'
.INC TERM
.IF TERM LE MAX .GOTO NEXT
.EXIT


;;;;;;;;; ERROR, PROBABLY NO TERMINAL LABEL
.NOTERM:
.DISABLE QUIET
; Specified terminal not in file. Please see the system manager to put it in.
