1
0
mirror of https://github.com/PDP-10/its.git synced 2026-02-27 01:09:49 +00:00

Add STTY.

This commit is contained in:
Lars Brinkhoff
2018-02-15 21:12:36 +01:00
parent 47cb894088
commit 7419b738c1
4 changed files with 222 additions and 1 deletions

View File

@@ -6,7 +6,7 @@ include conf/network
SRC = system syseng sysen1 sysen2 sysen3 sysnet kshack dragon channa \
midas _teco_ emacs emacs1 rms klh syshst sra mrc ksc eak gren \
bawden _mail_ l lisp libdoc comlap lspsrc nilcom rwk chprog rg \
inquir acount gz sys decsys ecc alan sail kcc kcc_sy c games
inquir acount gz sys decsys ecc alan sail kcc kcc_sy c games archy
DOC = info _info_ sysdoc sysnet syshst kshack _teco_ emacs emacs1 c kcc chprog
BIN = sys2 device emacs _teco_ lisp liblsp alan inquir sail comlap c decsys \
moon

View File

@@ -250,6 +250,7 @@ A list of [known ITS machines](doc/machines.md).
- SRCCOM, Compares/merges source files, compares binary files.
- STINK, linker.
- STINKR, new linker (binary only).
- STTY, set terminal parameters.
- STY, pseudo-terminal for multiple sessions.
- STYLOG, convert PTY output file into ascii file.
- SUPDUP, Supdup client.

View File

@@ -739,6 +739,10 @@ expect ":KILL"
respond "*" ":midas sys3;ts fido_ksc;fidox\r"
expect ":KILL"
# STTY
respond "*" ":midas sys2;ts stty_archy;stty\r"
expect ":KILL"
# lisp
respond "*" ":link l;fasdfs 1,lisp;.fasl defs\r"
respond "*" ":link lisp;grind fasl,lisp;gfile fasl\r"

216
src/archy/stty.31 Normal file
View 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