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

Added CHATER. This programs displays active com links.

Resolves #517.
This commit is contained in:
Eric Swenson
2019-01-25 17:02:33 -08:00
parent 459f545387
commit 8a98838e29
5 changed files with 171 additions and 1 deletions

152
src/gren/coms.17 Normal file
View File

@@ -0,0 +1,152 @@
;-*-Midas-*-
Title :COMS - Show com links
A=1
B=2
C=3
D=4
T1=5
T2=6
T3=7
T=10 ;This TTY#
L=11 ;Loop counter for TTY's
RH=12 ;RH of TTYSTS word
Com=13 ;TTYCOM word
N=14 ;Number of com rings
G=15
TTYo==1
.INSRT KP;MACROS >
TTYs: Block 77
Bits: %TCLFT,,"s ;This person is (s)laved.
%TCRFT,,"e ;This person slaving someone.
%TCICO,,"i ;Typein falls through link.
%TCOCO,,"o ;Typeout displays.
%TCRFS,,"r ;(r)efusing links.
%TCQRY,,"q ;(q)uery set.
%TCCBK,,"K ;This evil guy is dropping someone from link.
%TCCBS,,"S ;Likewise, but now he's about to (S)lave someone.
nBits==.-Bits
NCT: 0
Uname: 0
TTYSTS: 0
Head: 0 ;Head of link circle
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Begin: Syscal OPEN,[%Clbit,,.uao\%TJDIS
%Climm,,TTYo
[Sixbit /TTY/]]
.Lose %LsFil
Move A,[Squoze 0,NCT]
.Eval A,
.Lose
Movem A,NCT
Move B,[Squoze 0,UNAME]
.Eval B,
.Lose
Movem B,Uname
Move C,[Squoze 0,TTYSTS]
.Eval C,
.Lose
Movem C,TTYSTS
Go: Movei L,2 ;Start looking at T02
Setz N,
Check: Skipe TTYs(L)
Jrst Next
Syscal TTYVAR,[%Climm,,400000(L)
[Sixbit /TTYCOM/]
%Clout,,Com]
Jrst Next
Hrre RH,Com
Jumpl RH,Next ;This TTY not in a link.
Yes: Aoj N, ;Start a new circle.
.Iot TTYo,[^P]
.Iot TTYo,["A]
.Iot TTYo,["(]
Setz G,
Move T,L
Movem L,Head
Disp: Jumpn G,[.Iot TTYo,[^M]
.Iot TTYo,[" ]
Jrst .+1]
Move A,TTYSTS
Add A,T
Hrli A,T3
Movss A
.Getloc A,
Hrr B,T3
Add B,Uname
Hrli B,T1
Movss B
.Getloc B,
Hlrz T2,T1
Caie T2,-1 ;If not logged in, or in Limbo, show Tnn
Skipn T1
Jrst [.Iot TTYo,["T]
Move T2,T
IDivi T2,10
Addi T2,60
.Iot TTYo,T2
Addi T3,60
.Iot TTYo,T3
.Iot TTYo,[" ]
Jrst .+1]
Jumpe T1,[Type ,"*Limbo*"
Jrst Extra]
6Type: Setz T2,
Rotc T1,6
Addi T2,40
.Iot TTYo,T2
Jumpn T1,6Type
Extra: Movsi T1,-nBits
Setz T3,
BCheck: Hllz T2,Bits(T1) ;The bit.
Tdne Com,T2
Jrst [Skipn T3
.Iot TTYo,[" ]
.Iot TTYo,Bits(T1)
Aoja T3,.+1]
Aobjn T1,BCheck
Follow: Came RH,Head
Jrst [Move T,RH
Setom TTYs(T)
Syscal TTYVAR,[%Climm,,400000(T)
[Sixbit /TTYCOM/]
%Clout,,Com]
.Lose
Hrre RH,Com
Aoja G,Disp]
.Iot TTYo,[")]
Next: Aoj L,
Came L,NCT
Jrst Check
Jumpn N,Die
Type ,"ANo com links"
Die: .Break 16,144000
END Begin

13
src/kp/macros.1 Normal file
View File

@@ -0,0 +1,13 @@
;; recreated 2019-01-25 by EJS for use by GREN; COMS >.
define type chan=tyoc,&STRING ; ignore the channel, it's alwways the tty
movei t1,.length string
move t2,[440700,,[asciz string]]
.call [ setz ? sixbit /siot/ ? %climm,,TTYo ? t2 ? setz t1 ]
.lose %lssys
termin
DEFINE SYSCAL OP,ARGS
.CALL [SETZ ? SIXBIT /OP/ ? ARGS ((SETZ))]
TERMIN