diff --git a/build/misc.tcl b/build/misc.tcl index 7c28c535..74e02290 100644 --- a/build/misc.tcl +++ b/build/misc.tcl @@ -769,6 +769,11 @@ respond "*" ":link sys;ts pb,sys;ts probe\r" respond "*" ":midas sys1;ts tty_sysen1;tty\r" expect ":KILL" +# TTYLINK, just a stub. +respond "*" ":midas sysbin;ttylin bin_bawden; u\r" +expect ":KILL" +respond "*" ":link device; chaos ttylin, sysbin; ttylin bin\r" + # RIPDEV respond "*" ":midas device;atsign r.i.p._sysen2;ripdev\r" expect ":KILL" diff --git a/doc/programs.md b/doc/programs.md index f833f6d3..ecca9117 100644 --- a/doc/programs.md +++ b/doc/programs.md @@ -266,6 +266,7 @@ - TVWRIT, write TV display contents as bitmap file. - TTLOC, advertises physical location of logged in users. - TTY, displays TTYs with UNAME/JNAME/CORE and other info. +- TTYLIN, Chaosnet TTYLINK server. - TTYSWP, swap TTYs. - TYPE8, type 8-bit file. - UFIND, find users. diff --git a/src/bawden/u.14 b/src/bawden/u.14 new file mode 100644 index 00000000..5712813f --- /dev/null +++ b/src/bawden/u.14 @@ -0,0 +1,103 @@ +;;;-*-Midas-*- + +a=:1 +b=:2 +c=:3 +d=:4 +e=:5 +t=:6 +tt=:7 +x=:10 +y=:11 +z=:12 + +nb=:13 + +p=:17 + +neti==:1 +neto==:2 + +call=:pushj p, +return=:popj p, +save==:push p, +rest==:pop p, +pause=:.break 16,100000 +quit=:.logout 1, + +loc 42 + jsr tsint +loc 100 + +define syscall name,args + .call [setz ? sixbit /name/ ? args(400000)] +termin + +.insrt dsk:system;chsdef > +$cpkbp==:440800,,%cpkdt +.vector pkt(%cpmxw) +.scalar pktbp +.scalar pktrm + +lpdl==:50. +.vector pdl(lpdl) + +go: .close 1, ; Started as server + move p,[-lpdl,,pdl-1] + .suset [.smask,,[%piioc]] + syscall chaoso,[movei neti ? movei neto ? movei 3] + .lose %lssys + movei a,%colsn + call init + move a,[440700,,[asciz "TTYLINK"]] + call print + call pktout + movei a,%cslsn + movei b,30.*10. ; 10 seconds + syscall netblk,[movei neto ? a ? b ? movem c] + .lose %lssys + caie c,%csrfc + quit + movei a,%coans + call init +;;; Ouch! Don't do that! + move a,[440700,,[ + asciz "Ouch! Don't do that!" + ]] + call print + call pktout + syscall finish,[movei neto] + jfcl + quit + +init: dpb a,[$cpkop pkt] + move tt,[$cpkbp pkt] + movem tt,pktbp + movei tt,%cpmxc + movem tt,pktrm + return + +tyo: sosge pktrm + .lose + idpb a,pktbp + return + +print1: sosge pktrm + .lose + idpb tt,pktbp +print: ildb tt,a + jumpn tt,print1 + return + +pktout: movei tt,%cpmxc + sub tt,pktrm + dpb tt,[$cpknb pkt] + syscall pktiot,[movei neto ? movei pkt] + .lose %lssys + return + +tsint: 0 + 0 + quit + +end go