1
0
mirror of https://github.com/PDP-10/its.git synced 2026-05-24 06:10:34 +00:00
Files
PDP-10.its/src/gren/coms.17
2019-01-26 07:10:59 -08:00

152 lines
2.3 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
;-*-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