mirror of
https://github.com/PDP-10/its.git
synced 2026-02-10 02:09:46 +00:00
Add STTY.
This commit is contained in:
216
src/archy/stty.31
Normal file
216
src/archy/stty.31
Normal file
@@ -0,0 +1,216 @@
|
||||
|
||||
title stty ;-*-MIDAS-*-
|
||||
|
||||
;;; Terminal-type setting hack
|
||||
;;; prompts for type if it is uncertain
|
||||
|
||||
a=1
|
||||
b=2
|
||||
c=3
|
||||
ttyin=4
|
||||
ttyout=5
|
||||
input=6
|
||||
tctyp=7
|
||||
p=17
|
||||
|
||||
lpdl==40
|
||||
|
||||
start: move p,[-lpdl,,pdl-1] ; setup
|
||||
.open ttyin,[.uii,,'tty]
|
||||
.lose 1000
|
||||
.open ttyout,[.uao,,'tty]
|
||||
.lose 1000
|
||||
.call [setz ; Get terminal info
|
||||
sixbit /ttyget/ ; don't want to bother if
|
||||
1000,,ttyin ; we already know what
|
||||
2000,,tctyp ; type it is.
|
||||
2000,,tctyp ; Bash same loc each time
|
||||
2000,,tctyp ; as we are only interested
|
||||
2000,,tctyp ; in the last value returned.
|
||||
402000,,tctyp]
|
||||
.lose 1000
|
||||
|
||||
; Check to see if user's terminal is one of the ones that we leave alone.
|
||||
|
||||
cain tctyp,1 ; "Good" DATAPOINT
|
||||
jrst die
|
||||
cain tctyp,3 ; IMLAC
|
||||
jrst die
|
||||
cain tctyp,5 ; TV
|
||||
jrst die
|
||||
cain tctyp,6 ; Memowreck
|
||||
jrst die
|
||||
cain tctyp,7 ; Software
|
||||
jrst die
|
||||
cain tctyp,10 ; Terminet
|
||||
jrst die
|
||||
|
||||
com: setz a,
|
||||
movei c,[asciz /ttp? /] ; prompt for type
|
||||
pushj p,tyob
|
||||
read: .iot ttyin,input ; get char and upper-case it
|
||||
caig input,"z
|
||||
caige input,"a
|
||||
skipa
|
||||
trz input,40
|
||||
|
||||
find: skipn types(a) ; do table lookup for type
|
||||
die: .break 16,140000 ; nobody here by that name
|
||||
camn input,types(a) ; check for match
|
||||
jrst set ; found it?
|
||||
addi a,1 ; try, try again
|
||||
jrst find
|
||||
|
||||
set: move c,compls(a) ; get corresponding prompt
|
||||
pushj p,tyob ; completion and print it
|
||||
cain input,"? ; if char was ?
|
||||
jrst com ; give him another chance
|
||||
.value @msgs(a) ; valret the right TCTYP line
|
||||
.break 16,140000
|
||||
|
||||
tyob: skipn c ; standard print routine
|
||||
popj p, ; expects address of string
|
||||
push p,c ; in AC C
|
||||
push p,b
|
||||
hrli c,440700
|
||||
tyobl: ildb b,c
|
||||
jumpe b,tyobx
|
||||
.iot ttyout,b
|
||||
jrst tyobl
|
||||
tyobx: pop p,b
|
||||
pop p,c
|
||||
popj p,
|
||||
|
||||
types: " ; for meanings see next table
|
||||
"V
|
||||
"L
|
||||
"F
|
||||
"4
|
||||
"W
|
||||
"D
|
||||
"H
|
||||
"5
|
||||
"T
|
||||
"I
|
||||
"M
|
||||
"Q
|
||||
"1
|
||||
"C
|
||||
"2
|
||||
"9
|
||||
"A
|
||||
"7
|
||||
"?
|
||||
0
|
||||
|
||||
compls: [asciz /VT100
|
||||
/]
|
||||
[asciz /VT52
|
||||
/]
|
||||
[asciz /LA36
|
||||
/]
|
||||
[asciz /Fox
|
||||
/]
|
||||
[asciz /DD4000
|
||||
/]
|
||||
[asciz /orthless
|
||||
/]
|
||||
[asciz /Dissapoint
|
||||
/]
|
||||
[asciz /HP2640
|
||||
/]
|
||||
[asciz /HP2645
|
||||
/]
|
||||
[asciz /Tektronix
|
||||
/]
|
||||
[asciz /Infoloss
|
||||
/]
|
||||
[asciz /Minibee
|
||||
/]
|
||||
[asciz /Soroc
|
||||
/]
|
||||
[asciz /Teleray 1061
|
||||
/]
|
||||
[asciz /Concept 100
|
||||
/]
|
||||
[asciz /Datamedia 2500
|
||||
/]
|
||||
[asciz /Heath 19
|
||||
/]
|
||||
[asciz /Ann Arbor Ambassador
|
||||
/]
|
||||
[asciz /VIP 7801
|
||||
/]
|
||||
[asciz/?
|
||||
Types are:
|
||||
|
||||
vt100
|
||||
v vt52
|
||||
l la36
|
||||
f Perkin-Elmer Fox 1100
|
||||
4 DeltaData 4000
|
||||
h hp2640
|
||||
5 hp2645
|
||||
d losing datapoints
|
||||
w "worthless" half-duplex terminals (i.e. trendatas)
|
||||
t tektronix (mostly 4013)
|
||||
i infoton
|
||||
m minibee
|
||||
q Soroc IQ120
|
||||
1 teleray 1061
|
||||
c concept 100
|
||||
2 DM 2500
|
||||
9 Heath 19
|
||||
a Ann Arbor Ambassador
|
||||
7 VIP 7801
|
||||
? this info (obviously)
|
||||
|
||||
Anything else leaves the terminal type unchanged.
|
||||
Now pick one...
|
||||
|
||||
/]
|
||||
|
||||
msgs: [asciz /:crtsty vt100
|
||||
p/]
|
||||
[asciz /:tctyp vt52
|
||||
p/]
|
||||
[asciz /:tctyp la36
|
||||
p/]
|
||||
[asciz /:crtsty fox no warn smeol
|
||||
p/]
|
||||
[asciz /:crtsty dd4000 no warn smeol
|
||||
p/]
|
||||
[asciz /:tctyp half,linel 124.,raw
|
||||
p/]
|
||||
[asciz /:tctyp loser
|
||||
p/]
|
||||
[asciz /:crtsty hp2640 smeol
|
||||
p/]
|
||||
[asciz /:crtsty hp2645 smeol
|
||||
p/]
|
||||
[asciz /:tctyp tek
|
||||
p/]
|
||||
[asciz /:crtsty i4380 speed 1200
|
||||
p/]
|
||||
[asciz /:tctyp mini
|
||||
p/]
|
||||
[asciz /:crtsty iq120 speed 1200
|
||||
p/]
|
||||
[asciz /:tctyp t1061
|
||||
p/]
|
||||
[asciz /:tctyp c100
|
||||
p/]
|
||||
[asciz /:tctyp dm2500
|
||||
p/]
|
||||
[asciz /:tctyp h19
|
||||
p/]
|
||||
[asciz /:tctyp aaa
|
||||
p/]
|
||||
[asciz /:crtsty vip7801
|
||||
p/]
|
||||
[asciz /:
|
||||
p/]
|
||||
|
||||
pdl: block lpdl
|
||||
|
||||
end start
|
||||
Reference in New Issue
Block a user