From 2dc0c05d571db3f8e419bbaa67972607205da7fa Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Thu, 20 Sep 2018 08:06:36 +0200 Subject: [PATCH] Assemble TARAKA (ATSIGN DRAGON) from original source code. --- build/basics.tcl | 4 +- src/channa/taraka.14 | 89 +++++++++++++++++++++++++++++++++ src/syseng/dragon.206 | 104 --------------------------------------- src/syseng/fsdefs.999999 | 1 + 4 files changed, 91 insertions(+), 107 deletions(-) create mode 100644 src/channa/taraka.14 delete mode 100644 src/syseng/dragon.206 create mode 120000 src/syseng/fsdefs.999999 diff --git a/build/basics.tcl b/build/basics.tcl index 39eec908..5ca00469 100644 --- a/build/basics.tcl +++ b/build/basics.tcl @@ -117,7 +117,7 @@ type ":vk\r" respond "*" ":midas sys;ts dskuse_syseng;dskuse\r" expect ":KILL" -respond "*" ":midas channa;atsign taraka_syseng; dragon\r" +respond "*" ":midas channa;atsign taraka_taraka\r" expect ":KILL" respond "*" ":link sys; atsign dragon,channa; atsign taraka\r" @@ -216,8 +216,6 @@ expect ":KILL" respond "*" ":link sys1;ts supdup,sysbin;supdup bin\r" -respond "*" ":link syseng;fsdefs 999999,system;fsdefs >\r" - # these two links are expected by sysnet; ftps > and are present # in the PI distribution respond "*" ":link ksc;nuuos 999999,klh;nuuos >\r" diff --git a/src/channa/taraka.14 b/src/channa/taraka.14 new file mode 100644 index 00000000..ab550a51 --- /dev/null +++ b/src/channa/taraka.14 @@ -0,0 +1,89 @@ +title taraka system start up dragon +version==.fnam2 +.mllit==1 + +a=1 +b=2 +c=3 + +diric==4 +dskic==5 +usrch==6 + +.insrt syseng;fsdefs > + + +taraka: +ifn 0,[ .call [ setz + sixbit/sstatu/ + movem a + setzm b ] ;b:=SYSDBG + .value + jumpge b,tarak0 + movei a,60. + .sleep a, + jrst taraka +] +tarak0: .call [ setz + sixbit /login/ + [sixbit /taraka/] + setzi 0] + jfcl + .suset [.ssname,,[sixbit /channa/]] + .open diric,[.bii,,'dsk + sixbit /.file./ + sixbit /(dir)/] + jsr die + .iot diric,[-2000,,ufd] + .close diric, + move a,ufd+udnamp ;get ptr to name area + addi a,ufd +dr1: cail a,ufd+2000 + jsr die + move b,unfn1(a) + camn b,[sixbit /rakash/] + .call [setz + sixbit /open/ + [.uii,,dskic] + [sixbit /dsk/] + [sixbit /rakash/] + unfn2(a) + setz [sixbit /channa/]] + jrst nxt + .call [ setz + sixbit /open/ + [1,,usrch] + [sixbit /usr/] + 1000,,0 + setz unfn2(a)] + jrst nxt + .reset usrch, + .call [ setz + sixbit /load/ + 1000,,usrch + setzi dskic] + jrst nxc + MOVE B,UNFN2(A) + .USET USRCH,[.SSNAME,,B] + .iot dskic,b + hrrzs b + .uset usrch,[.supc,,b] + .CALL [ SETZ + 'DISOWN + MOVEI USRCH + 405000,,5 ] ;NO APRC.4.9, .USTP=0 + .VALUE ;HMM + caia +nxc: .uclose usrch, +nxt: .close dskic, + .close usrch, + addi a,lunblk + jrst dr1 + +die: 0 + .logout + .value + +ufd: block 2000 + +end taraka diff --git a/src/syseng/dragon.206 b/src/syseng/dragon.206 deleted file mode 100644 index 0c76b14a..00000000 --- a/src/syseng/dragon.206 +++ /dev/null @@ -1,104 +0,0 @@ -;;;-*-Midas-*- - -TITLE DRAGON -- top-level daemon - -;;; The ITS system job looks for the file DSK:SYS;ATSIGN DRAGON, and if it exists, -;;; launches this DRAGON daemon. When launched, DRAGON logs in as TARAKA and searches -;;; the CHANNA directory for files whose FN1 is RAKASH. Any that it finds, it launches -;;; as daemons. - -;;; -;;; The source for DRAGON has been long lost. When ITS was active, the last time it -;;; was built was in 1977. This source was recreated from the binary by EJS on -;;; on 2016-11-15. When assembled, this version results in an identical binary -;;; to the one that was included in the PI/MX distribution, and therefore to the -;;; version in place on MC/AI at the time of the shutdown of those systems. -;;; -;;; Note: I'm sure some of the constants in this file should be replaced with -;;; symbolic constants. At this point, I haven't yet figured out what they should -;;; all be (it's been over 36 years since I last used ITS at MIT. As I and others -;;; see fit, we can update this source to be more in keeping with the standards -;;; expected of ITS developers! -- EJS@MIT-MC (today: eric@swenson.org) -;;; - -dirchn=4 -filchn=5 -jobchn=6 - -dirbsz=2000 - -nop=255000000000 - -taraka=sixbit/TARAKA/ -channa=sixbit /CHANNA/ -rakash=sixbit /RAKASH/ - -lpdl==:100. -.vector pdl(lpdl) - -go: .call [setz ;; login as TARAKA - sixbit/LOGIN / - [ taraka ] - setzi 0] - nop ;; ignore errors logging in - .suset [.ssnam,,[channa]] ;; set SNAME to CHANNA - ;; open CHANNA UDIR - .open dirchn, [.bii,,'DSK ? sixbit/.FILE./ ? sixbit /(DIR) /] - jsr done - .iot dirchn, [-dirbsz,,dirblk] ;; read in UDIR - .close dirchn, - move 1, dirblk+1 ;; get offset to name area into R1 - addi 1, dirblk ;; convert to address of name area -filoop: cail 1, [ taraka ] ;; have we reached end of buffer? - jsr done ;; yes, abort - move 2, (1) ;; get FN1 into R2 - camn 2, [ rakash ] ;; is FN1 == RAKASH - .call [setz ;; yes, open the file - sixbit /OPEN / - [ .uii,,filchn ] - [ sixbit /DSK / ] ;; DSK: device - [ rakash ] ;; FN1 - 1,,1 ;; FN2 (from dirblk in R1 + 1) - 400000,, [ channa ]] - jrst nextfl ;; try next file - .call [setz ;; start create daemon job - SIXBIT/OPEN / - [ 1,,jobchn ] - [ sixbit /USR / ] ;; USR: device - 001000000000 ;; use uname of TARAKA - 400001,,1] ;; use jname of FN2 of daemon - jrst nextfl ;; process next file on error - .reset jobchn, - .call [setz ;; load program into job - sixbit/LOAD / - 001000,,jobchn ;; specify job channel - 401000,,filchn] ;; specify file channel - jrst nextjb ;; on error, clean up job and process next file - move 2, 1(1) ;; get FN2/Job name in R2 - .uset jobchn, [.ssnam,,2] ;; set SNAME of job - .iot filchn, 2 ;; get starting address? - hrrzs 0, 2 ;; zero out instruction opcode? - .uset jobchn, [.supc,,2] ;; set starting address of new job - .call [setz ;; disown job (doc doesn't seem to match - SIXBIT/DISOWN/ ;; this call from sysdoc; _calls 127 - 201000,,jobchn ;; don't know what these bits do - 405000,,5] ;; don't see second argument documented??? - .value 0 ;; kill ourselves on error? - caia 0, 0 -nextjb: .uclose jobchn, ;; kill job -nextfl: .close filchn, ;; close file - .close jobchn, ;; close job - addi 1, 5 ;; compute address of next file - jrst filoop ;; and loop - -done: 0 - .logout 0, - .value 0 - -dirblk: 0 - 0 - -bufsize==1632 -loc .+bufsiz - - end go diff --git a/src/syseng/fsdefs.999999 b/src/syseng/fsdefs.999999 new file mode 120000 index 00000000..0e08610a --- /dev/null +++ b/src/syseng/fsdefs.999999 @@ -0,0 +1 @@ +system/fsdefs.> \ No newline at end of file