diff --git a/README.md b/README.md index c51d351b..62f52cd4 100644 --- a/README.md +++ b/README.md @@ -202,6 +202,7 @@ A list of [known ITS machines](doc/machines.md). - TMPKIL, clean out old files in .TEMP.;. - TTLOC, Advertises physical location of logged in users. - TYPE8, type 8-bit file + - UPTIME, Chaosnet uptime server. - WHAT, humorous quips to various "what" questions. 6. A brand new host table is built from the host table source and diff --git a/build/build.tcl b/build/build.tcl index b8e089fe..11842084 100644 --- a/build/build.tcl +++ b/build/build.tcl @@ -960,6 +960,11 @@ respond "*" ":link dragon;hourly tmpkil,sys2;ts tmpkil\r" respond "*" ":midas sys2;ts what_syseng;what\r" expect ":KILL" +# UPTIME +respond "*" ":midas sysbin;uptime bin_sysen1;uptime\r" +expect ":KILL" +respond "*" ":link dragon;hourly uptime,sysbin;uptime bin\r" + # PHOTO respond "*" ":midas sys2;ts photo_sysen2;photo\r" expect ":KILL" diff --git a/src/sysen1/uptime.4 b/src/sysen1/uptime.4 new file mode 100755 index 00000000..6c569ad8 --- /dev/null +++ b/src/sysen1/uptime.4 @@ -0,0 +1,79 @@ +;;;-*-Midas-*- + +title UPTIME - Chaosnet UPTIME server. + +a=:1 +b=:2 +c=:3 + +neti=:15 +neto=:16 + +quit=:.logout 1, + +.insrt dsk:system;chsdef > + +.vector pkt(%cpmxw) + +loc 42 + jsr tsint +loc 100 + +go: .close 1, + .suset [.smask,,[%piioc]] + .call [ setz + sixbit /chaoso/ + movei neti + setzi neto] + quit + movei a,%colsn + dpb a,[pkt+$cpkop] + move a,[.byte 8 ? "U ? "P ? "T ? "I] + movem a,pkt+%cpkdt + move a,[.byte 8 ? "M ? "E] + movem a,pkt+%cpkdt+1 + movei a,6 + dpb a,[pkt+$cpknb] + .call pktout + quit + movei a,%cslsn + movei b,30.*30. + .call [ setz + sixbit /netblk/ + movei neto + move a + move b + setzm c] + quit + caie c,%csrfc + quit + movei a,%coans + dpb a,[pkt+$cpkop] + .rdtime a, + lsh a,1 + move b,[440800,,pkt+%cpkdt] + idpb a,b +repeat 3,[ + lsh a,-8 + idpb a,b +] + movei a,4 + dpb a,[pkt+$cpknb] + .call pktout + quit + .call [ setz + sixbit /finish/ + setzi neto] + quit + quit + +tsint: 0 + 0 + quit + +pktout: setz + sixbit /pktiot/ + movei neto + setzi pkt + +end go