1
0
mirror of https://github.com/PDP-10/its.git synced 2026-01-28 04:57:43 +00:00

Added STY.

This commit is contained in:
Eric Swenson
2016-12-10 00:18:42 -08:00
committed by Lars Brinkhoff
parent c87a135049
commit dba4fb52c6
3 changed files with 97 additions and 0 deletions

View File

@@ -134,6 +134,7 @@ There's a [DDT cheat sheet](doc/DDT.md) for Unix users.
- SPELL, ESPELL spell checker.
- SRCCOM, Compares/merges source files, compares binary files.
- STINK, linker.
- STY, pseudo-terminal for multiple sessions.
- SUPDUP, Supdup client.
- SYSMSG, displays system messages.
- TALK/WHO/WHOJ/WHOM/USERS, list users.

View File

@@ -810,6 +810,10 @@ respond "*" "nlinks+14/ A,,646471\r"
type ":pdump sys1;ts prufd\r"
respond "*" ":kill\r"
# STY
respond "*" ":midas sys1;ts sty_sysen2;sty\r"
expect ":KILL"
# ndskdmp tape
respond "*" ":link kshack;good ram,.;ram ram\r"
respond "*" ":link kshack;ddt bin,.;@ ddt\r"

92
src/sysen2/sty.25 Normal file
View File

@@ -0,0 +1,92 @@
TITLE PSEUDO-TTY HACK
A=1
B=2
C=3
D=4
P=17
TYI==1
TYO==2
PYI==3
PYO==4
GO: MOVEI P,PDL-1
.SUSET [.SMSK2,,[1_TYI+1_PYI+1_TYO]]
.OPEN TYI,[SIXBIT / $TTY/]
.LOSE %LSFIL
.OPEN TYO,[SIXBIT / %TTY/]
.LOSE %LSFIL
.OPEN PYI,[SIXBIT / STY/]
.LOSE %LSFIL
.OPEN PYO,[SIXBIT / %STY/]
.LOSE %LSFIL
.IOT PYO,[^Z]
JFCL
.HANG ;WAIT, AND WAIT, AND WAIT...
ZZ==.
LOC 42
JSR TSINT
LOC ZZ
TSINT: 0
0
MOVE B,TSINT
TRNE B,1_TYO
PUSHJ P,MORINT
TRNE B,1_TYI
PUSHJ P,INTYI
TRNE B,1_PYI
PUSHJ P,INPYI
.DISMISS TSINT+1
INPYI: PUSH P,TSINT+1
.SUSET [.SDF2,,[1_PYI]]
.SUSET [.SPICLR,,[-1]]
LP: .IOT PYI,C
JUMPL C,OUT ;THAT WASN'T REALLY A CHARACTER
.IOT TYO,C
JRST LP
CPOPJ: POPJ P,
INTYI: PUSH P,C
MOVEI C,TYI
.ITYIC C,
JRST POPCJ ;NOT REALLY A CHARACTER THERE
.IOT TYI,C
.IOT PYO,C
JRST POPCJ
OUT: .SUSET [.SPICLR,,[0]]
.SUSET [.SDF2,,[0]]
POP P,TSINT+1
POPJ P,
MORINT: PUSH P,C
MOVEI C,[ASCIZ /--MORE--/]
PUSHJ P,TYPSTR
.IOT TYI,C
PUSH P,C
MOVEI C,[ASCIZ /
/]
PUSHJ P,TYPSTR
POP P,C
CAIE C,40
CAIN C,177
CAIA
.IOT PYO,C
POPCJ: POP P,C
POPJ P,
TYPSTR: HRLI C,440700
TYPST1: ILDB D,C
JUMPE D,CPOPJ
.IOT TYO,D
JRST TYPST1
PDL: BLOCK 50
END GO