diff --git a/Makefile b/Makefile index 3239cc6d..456b6029 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ SRC = syseng sysen1 sysen2 sysen3 sysnet kshack dragon channa \ macsym lmcons dmcg hack hibou agb gt40 rug maeda ms kle aap common \ fonts zork 11logo kmp info aplogo bkph bbn pdp11 chsncp sca music1 \ moon teach ken lmio1 llogo a2deh chsgtv clib sys3 lmio turnip \ - mits_s rab stan_k bs cstacy kp + mits_s rab stan_k bs cstacy kp dcp2 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 ca457bce..04044509 100644 --- a/build/misc.tcl +++ b/build/misc.tcl @@ -993,6 +993,11 @@ respond "*" ":midas sysbin;_sysnet;sends\r" expect ":KILL" #respond "*" ":link device;chaos send,sysbin;senver bin\r" +# Chaosnet BABEL service. +respond "*" ":midas sysbin; babel_dcp2; babel\r" +expect ":KILL" +respond "*" ":link device;chaos babel,sysbin; babel bin\r" + # OBS respond "*" ":midas sys;ts obs_bawden;obs\r" expect ":KILL" diff --git a/doc/programs.md b/doc/programs.md index c7f4a222..afec000e 100644 --- a/doc/programs.md +++ b/doc/programs.md @@ -27,6 +27,7 @@ - ATSIGN DEVICE, load device drivers. - ATSIGN TARAKA, starts dragons. - ATSIGN TCP, TCP support. +- BABEL, Chaosnet server. - BALANC/MOVDIR, balances directories. - BDAY, happy birthday demon. - BINPRT, display information about a binary executable file. diff --git a/src/dcp2/babel.2 b/src/dcp2/babel.2 new file mode 100755 index 00000000..caeb9aab --- /dev/null +++ b/src/dcp2/babel.2 @@ -0,0 +1,49 @@ +title babel server +%colsn==12 ? %coopn==2 ? %cslsn==1 ? %csrfc==2 + + loc 42 + -tsintl,,tsint + + loc 100 +tsint: 17 + %piioc+%pilos ? 0 ? -1 ? -1 ? die ;handle ioc errors and LOSE's +tsintl==.-tsint + +lsnpkt: .byte 16. ? %colsn_8 ? 5 ? .byte + 0 ? 0 ? 0 + .byte 8 ? irpc ch,,[BABEL] ? "ch ? termin ? .byte +opnpkt: .byte 16. ? %coopn_8 ? 0 ? .byte +pdl: block 4 +go: .close 1, + move 17,[-4,,pdl] + .suset [.roption,,1] + tlo 1,optint + .suset [.soption,,1] + .suset [.smask,,[%piioc+%pilos]] + .call [ setz ? 'chaoso ? movei 0 ? movei 1 ? setzi 2] + jrst die + .call [ setz ? 'pktiot ? movei 1 ? setzi lsnpkt] + jrst die + movei 1,30.*60.*2 ;two minutes + .call [ setz ? 'netblk ? movei 1 ? movei %cslsn ? move 1 ? setzm 1] + jrst die + caie 1,%csrfc + jrst die + .call [ setz ? 'pktiot ? movei 1 ? setzi opnpkt] + jrst die +loop: move 1,[440700,,[asciz ~ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~]] + movei 2,176-40 + .call [setz ? sixbit /siot/ ? movei 1 ? move 1 ? setz 2] + jrst die + jrst loop +die: .logout 1, + .break 16,160000 + .value +end go + +;;; local modes: +;;; mode:midas +;;; auto fill mode: +;;; fill column:70 +;;; compile command: :midas mc:device;chaos babel_1 î +;;; end: