diff --git a/Makefile b/Makefile index c814332a..f21c620d 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ SRC = system syseng sysen1 sysen2 sysen3 sysnet kshack dragon channa \ jim jm jpg macrak maxdoc maxsrc mrg munfas paulw reh rlb rlb% share \ tensor transl wgd zz graphs lmlib pratt quux scheme gsb ejs mudsys \ draw wl taa tj6 budd sharem ucode rvb kldcp math as imsrc gls demo \ - macsym lmcons dmcg hack hibou agb gt40 rug + macsym lmcons dmcg hack hibou agb gt40 rug maeda DOC = info _info_ sysdoc sysnet syshst kshack _teco_ emacs emacs1 c kcc \ chprog sail draw wl pc tj6 share _glpr_ _xgpr_ inquir mudman system \ xfont maxout ucode moon acount alan channa fonts games graphs humor \ diff --git a/build/misc.tcl b/build/misc.tcl index 54508fa6..f42171ea 100644 --- a/build/misc.tcl +++ b/build/misc.tcl @@ -620,6 +620,11 @@ respond "*" ":midas sys1;ts bye_sysen1;bye\r" expect ":KILL" respond "*" ":link device;chaos bye,sys1;ts bye\r" +# yow server +respond "*" ":midas sys3;ts yow_maeda; yow\r" +expect ":KILL" +respond "*" ":link device;chaos yow, sys3; ts yow\r" + # @ respond "*" ":midas sys;ts @_sysen1;@\r" expect ":KILL" diff --git a/doc/programs.md b/doc/programs.md index 2803a227..c81d92b9 100644 --- a/doc/programs.md +++ b/doc/programs.md @@ -271,3 +271,4 @@ - XGPSPL, spooler for the Xerox Graphics Printer. - XXFILE, feed scripted input to a STY session. - YAHTZE, the game of Yahtzee. +- YOW, print Zippyisms. diff --git a/src/common/yow.22 b/src/common/yow.22 new file mode 100755 index 00000000..f7afc2ed Binary files /dev/null and b/src/common/yow.22 differ diff --git a/src/maeda/yow.14 b/src/maeda/yow.14 new file mode 100755 index 00000000..d7e4d4d6 --- /dev/null +++ b/src/maeda/yow.14 @@ -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= +ret= + +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