1
0
mirror of https://github.com/PDP-10/its.git synced 2026-02-16 12:53:06 +00:00

Assemble TARAKA (ATSIGN DRAGON) from original source code.

This commit is contained in:
Lars Brinkhoff
2018-09-20 08:06:36 +02:00
parent 823ed80c6b
commit 2dc0c05d57
4 changed files with 91 additions and 107 deletions

89
src/channa/taraka.14 Normal file
View File

@@ -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

View File

@@ -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

1
src/syseng/fsdefs.999999 Symbolic link
View File

@@ -0,0 +1 @@
system/fsdefs.>