mirror of
https://github.com/PDP-10/its.git
synced 2026-02-06 16:44:44 +00:00
YOW - print Zippyisms.
This commit is contained in:
BIN
src/common/yow.22
Executable file
BIN
src/common/yow.22
Executable file
Binary file not shown.
192
src/maeda/yow.14
Executable file
192
src/maeda/yow.14
Executable file
@@ -0,0 +1,192 @@
|
||||
;-*-MIDAS-*-
|
||||
|
||||
title YOW -- Print Zippyisms
|
||||
|
||||
;8/29/88 Maeda - created by snarfing code from BYE program
|
||||
; removed inquir database stuff
|
||||
|
||||
printx /
|
||||
Be sure to install the binary on all systems
|
||||
|
||||
/
|
||||
|
||||
a=1
|
||||
b=2
|
||||
c=3
|
||||
d=4
|
||||
e=5
|
||||
f=6
|
||||
cnt=7
|
||||
t=15
|
||||
tt=16
|
||||
p=17
|
||||
|
||||
;;; IO channels
|
||||
tyi==1
|
||||
tyoch==2
|
||||
linch==3
|
||||
idxch==4 ; index file input
|
||||
odxch==5 ; index file output
|
||||
lsrch==6
|
||||
|
||||
;;; Random constants
|
||||
pdlsiz==20 ; pdl
|
||||
ascbyt==440700 ; ascii byte ptr waiting to be read
|
||||
|
||||
print=1000,, ;glik!
|
||||
|
||||
call=<pushj p,>
|
||||
ret=<popj p,>
|
||||
|
||||
define syscall name,args
|
||||
.call [setz ? sixbit /name/ ? args((setz))]
|
||||
termin
|
||||
|
||||
;;; Network hackery
|
||||
netwrk"$$serve==1
|
||||
netwrk"$$chaos==1
|
||||
.insrt syseng;netwrk >
|
||||
|
||||
byelib"$$deth==1
|
||||
byelib"$$yow==1
|
||||
.insrt syseng;byelib >
|
||||
|
||||
;$debug==1
|
||||
|
||||
|
||||
subttl figure out if we're a server; print out messges.
|
||||
|
||||
.scalar uname, server, pdl(pdlsiz)
|
||||
|
||||
begin: move p,[-pdlsiz,,pdl-1]
|
||||
.suset [.rxuname,,uname]
|
||||
.suset [.rjname,,a]
|
||||
came a,[sixbit/chaos/]
|
||||
call ttyini
|
||||
call srvini
|
||||
|
||||
IFDEF $debug,{
|
||||
move t,[440700,,[asciz "Yow: i/o enabled... "]]
|
||||
movei tt,25
|
||||
syscal siot,[%climm,,tyoch ? %clin,,t ? %clin,,tt]
|
||||
.lose %lsfil
|
||||
}
|
||||
|
||||
nounam: call byelib"getmsg
|
||||
|
||||
IFDEF $debug,{
|
||||
move t,[440700,,[asciz "message found..."]]
|
||||
movei tt,20
|
||||
syscal siot,[%climm,,tyoch ? %clin,,t ? %clin,,tt]
|
||||
.lose %lsfil
|
||||
}
|
||||
|
||||
syscal siot,[%climm,,tyoch ? %clin,,a ? %clin,,b]
|
||||
jsr death
|
||||
syscal finish,[%climm,,tyoch] ;wait for all output to get to tty.
|
||||
.lose %lssys
|
||||
Skipe server
|
||||
jrst srvend
|
||||
exit: .suset [.roption,,c]
|
||||
tlnn c,%opbrk ; Don't .BREAK unless a superior handles it.
|
||||
.logout 1,
|
||||
.break 16,124000 ;die as quitely as possible
|
||||
|
||||
srvend: movei t,netwrk"%coeof
|
||||
setzm netwrk"pktbuf
|
||||
dpb t,[netwrk"$cpkop+netwrk"pktbuf]
|
||||
syscal pktiot,[%climm,,tyoch ? %climm,,netwrk"pktbuf]
|
||||
jfcl
|
||||
syscal finish,[%climm,,tyoch]
|
||||
jfcl
|
||||
.sleep c, ;seems to be needed for some reason
|
||||
.logout 1, ;to delay before closing
|
||||
|
||||
ttyini: .suset [.smask,,[%pityi]]
|
||||
syscal open,[%clbit,,.uao ? %climm,,tyoch ? [sixbit/tty/]]
|
||||
.lose %lsfil
|
||||
syscal open,[%clbit,,.uai ? %climm,,tyi ? [sixbit/tty/]]
|
||||
.lose %lsfil
|
||||
aos (p) ;return to .+2
|
||||
ret
|
||||
|
||||
srvini: setom server ;we're a chaosnet server, not talking to a tty
|
||||
|
||||
IFDEF $debug,{ ;if debugging, open TTY anyway
|
||||
syscal open,[%clbit,,.uao ? %climm,,tyoch ? [sixbit/tty/]]
|
||||
.lose %lsfil
|
||||
}
|
||||
.suset [.smask,,[%piioc]]
|
||||
movei a,tyi
|
||||
movei c,[asciz/YOW/]
|
||||
movei d,5
|
||||
call netwrk"chasrv
|
||||
.logout 1,
|
||||
move a,[440600,,d]
|
||||
move b,[440800,,netwrk"pktbuf+netwrk"%cpkdt]
|
||||
ldb c,[netwrk"$cpknb+netwrk"pktbuf]
|
||||
movei d,0
|
||||
unmgt1: ildb e,b ;get user name from contact args
|
||||
caie e,40
|
||||
sojg c,unmgt1
|
||||
sojle c,nounam ;just print msg w/o see ya later bullshit
|
||||
unmgt2: ildb e,b
|
||||
caige e,140
|
||||
subi e,40
|
||||
tlne a,770000
|
||||
idpb e,a
|
||||
sojg c,unmgt2
|
||||
jumpe d,nounam
|
||||
movem d,uname
|
||||
ret
|
||||
|
||||
subttl uuo and interrupt handlers
|
||||
|
||||
uuoh: 0
|
||||
move a,40
|
||||
hrli a,ascbyt
|
||||
lo: ildb b,a
|
||||
skipn b
|
||||
jrst @uuoh
|
||||
.iot tyoch,b
|
||||
jrst lo
|
||||
|
||||
tsint: 0 ? 0
|
||||
push p,a
|
||||
move a,tsint
|
||||
trne a,%piioc
|
||||
jsr death
|
||||
movei a,tyi
|
||||
.ityic a,
|
||||
jrst intout
|
||||
caie a,^s
|
||||
cain a,^g
|
||||
jrst shutup
|
||||
intout: pop p,a
|
||||
.dismiss tsint+1
|
||||
|
||||
.scalar debug
|
||||
|
||||
death: 0 ;jsr here on error
|
||||
skipn debug
|
||||
jrst exit ; oh well, give up...
|
||||
sos death
|
||||
sos death
|
||||
syscal lose,[movei ? death]
|
||||
|
||||
shutup: .reset tyoch,
|
||||
jrst exit
|
||||
|
||||
;;; dump variables so we can figger out where lsr maps in
|
||||
consta
|
||||
variab
|
||||
|
||||
-1 ;So core gets created!
|
||||
|
||||
lsrbeg==<.+1777>/2000 ;beginning of LSR pages.
|
||||
|
||||
loc 41
|
||||
jsr uuoh
|
||||
jsr tsint
|
||||
|
||||
end begin
|
||||
Reference in New Issue
Block a user