mirror of
https://github.com/PDP-10/its.git
synced 2026-01-29 05:11:14 +00:00
WHOSEN - print author of last send.
This commit is contained in:
committed by
Eric Swenson
parent
001cc7be0f
commit
4db412b320
45
src/syseng/wsent.1
Executable file
45
src/syseng/wsent.1
Executable file
@@ -0,0 +1,45 @@
|
||||
; -*- Midas -*-
|
||||
|
||||
TITLE Print author of last send
|
||||
|
||||
A=1 ;General purpose AC's
|
||||
B=2
|
||||
D=5 ;Used by TYPE
|
||||
E=6
|
||||
TYOC==4 ;TTY output chnl
|
||||
|
||||
DEFINE SYSCAL OP,ARGS
|
||||
.CALL [SETZ ? SIXBIT /OP/ ? ARGS ((SETZ))]
|
||||
TERMIN
|
||||
|
||||
DEFINE TYPE &STRING
|
||||
MOVEI D,<.LENGTH STRING>
|
||||
MOVE E,[440700,,[ASCII STRING]]
|
||||
SYSCAL SIOT,[%CLIMM,,TYOC ? E ? D]
|
||||
.LOSE %LSFIL
|
||||
TERMIN
|
||||
|
||||
|
||||
START: SYSCAL OPEN,[%CLBIT,,.UAO
|
||||
%CLIMM,,TYOC ;Open TTY for output
|
||||
[SIXBIT /TTY/]]
|
||||
.LOSE %LSFIL
|
||||
|
||||
.VALUE [ASCIZ \:DDTSYM CLIUNM/1/1QîP\] ;Get contents of
|
||||
;CLIUNM -> AC A
|
||||
JUMPN A,YUP ;Was there something in there?
|
||||
TYPE "No sends" ;No. Say so
|
||||
JRST DONE ;and Quit
|
||||
|
||||
YUP: TYPE "Last send by " ;Yup, something there...
|
||||
|
||||
6TYPE: ROTC A,6 ;Leftmost char in A into B
|
||||
JUMPE B,DONE ;A 0? Yes, so at end of 6bit, so quit
|
||||
ADDI B,40 ;Change to ASCII
|
||||
.IOT TYOC,B ;Output it
|
||||
SETZ B, ;Zap B so we don't keep old character
|
||||
JRST 6TYPE ;and get next from A
|
||||
|
||||
DONE: .LOGOUT 1, ;Self-destruct
|
||||
|
||||
END START
|
||||
Reference in New Issue
Block a user