diff --git a/build/misc.tcl b/build/misc.tcl index d7654ce2..f6e2045a 100644 --- a/build/misc.tcl +++ b/build/misc.tcl @@ -672,6 +672,10 @@ expect ":KILL" respond "*" ":link device;jobdev hs,device;jobdev hsname\r" respond "*" ":link device;jobdev hf,device;jobdev hsname\r" +# gunner +respond "*" ":midas device; jobdev shoe_rwk; gunner\r" +expect ":KILL" + # pr respond "*" ":midas sys1;ts pr_sysen1;pr\r" expect ":KILL" diff --git a/doc/programs.md b/doc/programs.md index 4e5f1933..ca62651d 100644 --- a/doc/programs.md +++ b/doc/programs.md @@ -112,6 +112,7 @@ - GO, the Go board game. - GOTO, go to specified terminal line. - GUESS, a very silly game. +- GUNNER, gun down jobs. - GMSGS, copy system messages to mail file. - H3MAKE, a job that requests DRAGON to build host table. - HEXIFY, convert COM file into Intel HEX format. diff --git a/src/rwk/gunner.31 b/src/rwk/gunner.31 new file mode 100644 index 00000000..cfcdfb48 --- /dev/null +++ b/src/rwk/gunner.31 @@ -0,0 +1,200 @@ +Title GUN: JOBDEV + +x=0 +a=1 +b=2 +c=3 +t=10 +tt=11 +sp=17 + +call=pushj sp, +ret=popj sp, + +bojc=7 ;jobdev pipeline channel +fooc=15 ;temporary USR device channel +usrc=16 ;USR device channel + +pdllen==50 + +define syscal oper,args + .call [setz ? sixbit /OPER/ ? args ((SETZ))] +termin + +argi==:1000,,0 +val==:2000,,0 +cnt==:4000,,0 +cnti==:5000,,0 + +loc 40 + 0 + jsr lost + -intlen,,tsint + +loc 100 +tsint: sp + %piioc ? 0 ? -1 ? -1 ? iocerr +intlen==.-tsint + +pdl: block pdllen + +go: .close 1, ;started by system + .suset [.smask,,[%piioc]] + .suset [.soption,,[%opojb\%opopc\%opint,,0]] + move sp,[-pdllen,,pdl] + syscal open,[cnti .uao\10 ;Don't reuse, expect him to open in OUTPUT + argi bojc + [sixbit /BOJ/]] + lose ; Fie, we lost! + move x,[-4,,namblk] + syscal jobcal,[argi bojc ;find out why we were called! + x ? [sixbit /GUNNER/]] + lose + movsi t,-loseln + .suset [.rxuname,,x] ;Check who we are +loschk: camn x,losers(t) + jrst ulost + aobjn t,loschk + jrst winlos + +ulost: movem x,fn1 + move x,passw + movem x,sname + movsi x,(sixbit //] ;> ? + camn x,[sixbit /