|
|
DataMuseum.dkPresents historical artifacts from the history of: RC4000/8000/9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC4000/8000/9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 32256 (0x7e00)
Types: TextFile
Names: »kkiccmtxt«
└─⟦621cfb9a2⟧ Bits:30002817 RC8000 Dump tape fra HCØ. Detaljer om "HC8000" projekt.
└─⟦0364f57e3⟧
└─⟦3b4b74406⟧ »kkmon3filer«
└─⟦this⟧
└─⟦667bb35d6⟧ Bits:30007480 RC8000 Dump tape fra HCØ.
└─⟦4334b4c0b⟧
└─⟦b8ddea98b⟧ »kkmon3filer«
└─⟦this⟧
(
message monchange release 5.x to 5.y
skip 36.1
c=copy mess.no 1
mdef=edit mondef
skip 36.1
c=copy mess.no 1
mcentral=edit moncentral
skip 36.1
c=copy mess.no 1
mprocs=edit monprocs
skip 36.1
c=copy mess.no 1
mdisc=move mondisc
skip 36.1
c=copy mess.no 1
mfpaline=move monfpaline
skip 36.1
c=copy mess.no 1
mhost=move monhost
skip 36.1
c=copy mess.no 1
mfpasub=move monfpasub
skip 36.1
c=copy mess.no 1
mtabinit=edit montabinit
skip 36.1
c=copy mess.no 1
mprocfnc1=move monprocfnc1
skip 36.1
c=copy mess.no 1
mprocfnc2=edit monprocfnc2
skip 36.1
c=copy mess.no 1
ms1=move mons1
skip 36.1
c=copy mess.no 1
ms2=move mons2
skip 36.1
c=copy mess.no 1
mcatinit=edit moncatinit
scope day mdef mcentral mprocs mdisc mfpaline mhost mfpasub,
mtabinit mprocfnc1 mprocfnc2 ms1 ms2 mcatinit
head cpu
finisb
end)
$def
;********************
l./a48=-4/,i/
a200= -14 ; first of internal process description
a194= -14 ; process descr addr(other comp) if type>2
a192= -12 ; process type 0 useal internal process
; 2 master process (this computer)
; 3 master mirror process
; 5 mirror process
a190= -10 ; process description addr of master process
a188= -8,a189= -7 ; computer number<12 + internal claim (other computer)
a186= -6, a187= -5 ; cpu running mask,allowed cpu mask
/,l./-a48/,r/a48/a200/,l./a48=first/,g 2/a48/a200/,
l./a139=-2/,i/
a158=-10 ; message buffer addr (other computer) or result
a156=-8 ; reciever <12 + sender (computer numbers)
a155=-6 ; process descr addr receiver (other computer)
a154=-4 ; process descr addr sender (other computer)
/,l./a6=/,r/a139/a158/,
f
$central
;********************
l./,f20,e/,r/f20/f22/,
l./b26=b5/,l1,i/
b55: 0 ; interrupt addr for cpu1
b57: 0 ; cur proc(cpu0) (when b1 is cur proc(cpu1))
b58: 0 ; relative addr of curr proc at cpu1
0,r.(:66<1 -k +2:) > 1 ;
b56: 0,r.a350 ; current process (cpu(i)) i=1,...,last cpu
f18: 1<23 +20 < 3 + 0 ; device addr for device 20 (cpu1)
c. a420
b105: 0 ; master process description addr
b106: 0 ; proc descr addr(systrm)
b107: 0 ; - - - (sysrec)
b108: 0 ; - - - (sysdma)
b109: 0 ; computer number (this computer)
z.
/,l./c0:/,r/c0:/c0:
jl w3 d25 ; stop cpu(i), i=1,...,last cpu;
/,l./c99:/,l1,i/
jl w3 d26 ; start cpu(i), i=1,...,last cpu;
/,l./h0:/,l1,i/
h1: d140 ; addr(dump core procedure)
/,l1,l./d140/,r/d140./(h1) /,r/./ /,r/);/) ;/,
l1,i/
jl w3 d27 ; init cpu1
/,
l./d10:/,l./i3:/,l./(x1-a16+a301)/,r/x1-a16+a301/i6/,l./i5:/,l2,i/
i6: a249+1 ; max number for priority except for a dummy process
/,l./e./,l1,i/
; bitpatterns:
g48: 3 ; constant 3 (= number of chars per word)
g50: 8.7777 7776 ; first 23 bits
g51: 8.7777 0000 ; first 12 bits
g52: 8.0000 7777 ; last 12 bits
g53: 8.0000 0377 ; last 8 bits
g49: 1<23 ; bit 0
g62: 1<18 ; bit 5
g65: 8.3777 7777 ; last 23 bits
g63: 1 ; bit 23
/,l./b52:/,l./comment:the/,i?
;
;
; the following procedures are all used to service other cpu's
; than the commen cpu (cpu0)
b. i20,h20 w.
; data-out instruction at cpu(i);
;
; start cpu1 1<23 + 20<3 + 0<1
; reset cpu1 1<23 + 20<3 + 1<1
; stop cpu1 1<23 + 20<3 + 2<1
;
; call: w2=relative addr of cpu(i), w1=return
; return: w2,w3 are unchanged, w0 are changed
; if cpu(i) is started then w1<h9 else w1=h9
h9=2
d21: al w0 4 ; set start signal for cpu(i)
rs w0 x2+b51 ;
am -2<1 ; start cpu(i)
d20: al w0 2<1 ; stop cpu(i)
wa w0 x2+f18 ; interrupt address(cpu(i))
rs w1 h1 ;
ds w3 h3 ;
al w1 0 ; do_count:=0;
i0: do (0) ; data_out(cpu(i))
sx 2.111 ; if buserror then
jl i2 ; goto count;
i1: dl w3 h3 ;
jl (h1) ; return;
i2: al w1 x1+1 ; do_count:=do_count+1;
se w1 h9 ; if do_count<h9 then
jl i0 ; goto repeat data_out instruction else
ls w2 -1 ; set cpu(x2) as not able to use;
al w3 2.10 ; w3=mask for cpu(1)
ls w3 x2 ; w3=2**(x2//2) ; mask for cpu(i)
ac w3 x3 ;
la w3 b59 ; remove bit for cpu(i)
rs w3 b59 ;
jl i1 ; return
h1: 0
h2: 0
h3: 0
b59: 2.000 000 000 011 ; mask for cpu's in use
b51: 0,r.a350 ; b51+2*i = 0 cpu(i) is stopped
; = 2 cpu(i) is ready
; = 4 cpu(i) can be started
;#1
;#1
d22: ;#1 wait for start of cpu1
al w0 0 ;#1
rs w0 b51+0 ;#1 set stop signal for cpu1
gg w3 66 ;#1 special wait for start
i4: rl w0 b51+0 ;#1
sn w0 0 ;#1 wait for start signal
jl i4 ;#1
ri a179 ;#1 start
; stop cpu(i) i=1,...,last cpu
; call: w3=return
; return: all reg unchanged
d25: ds w1 h5 ;
ds w3 h7 ;
al w2 -2 ;
i5: al w2 x2+2 ; next cpu
sl w2 a351+1 ; if all cpu's is stopped then
jl i6 ; return
rl w1 x2+b56 ;
sn w1 0 ; if no proc then
jl i5 ; goto next proc
al w0 0 ;
hs w0 x1+a186 ; clear cpu running mask
jl w1 d20 ; stop cpu(i)
jl i5 ; next cpu;
i6: dl w1 h5 ;
dl w3 h7 ;
jl x3 ; return
; start cpu(i) i=1,...,last cpu
; call: w1=curr int proc at cpu0 before interrupt, w3=return
; return: all reg. are changed
d26: rs w3 h7 ;
al w0 0 ;
rs w0 b57 ; clear interrupt flag;
al w2 -2 ;
al w3 1 ; w3:=mask(cpu0);
i10: ls w3 1 ; w3:=mask(next cpu);
al w2 x2+2 ; w2:=addr(next cpu);
sl w2 a351+1 ; if all cpu is started then
jl i13 ; goto test first proc
al w0 a353 ; w0:=mask for allowed cpu;
rl w1 b59 ; w1:=mask for cpu in use;
sz w1 x3 ; if the cpu can not be used or
so w0 x3 ; the cpu is not allowed then
jl i10 ; goto next cpu else
rl w1 x2+b56 ; w1:=proc addr of cpu(x2);
se w1 0 ; if addr(proc)<>0 then
jl i14 ; goto start cpu(x2)
al w1 b2 ; w1:=chain head
i11: rl w1 x1 ; w1:=next proc in time slice queue;
i12: al w0 x1-a16 ; process addr
rs w0 x2+b56 ;
rl w0 x1-a16+a187; w0:=mask for allowed cpu;
sh w0 2047 ; if cpu(x2) is started or
so w0 x3 ; this cpu can not be used then
jl i11 ; goto next proc;
i14: jl w1 d21 ; start cpu(x2)
sl w1 h9 ; the cpu can not be started then
jl i10 ; goto next cpu
rl w1 x2+b56 ; else
hs w3 x1+a186 ; set cpu running mask;
al w0 a95 ;
hs w0 x1+a13 ; state:=running;
jl i10 ; goto next cpu
i13: al w2 b2 ;
i16: rl w2 x2 ; w2:= next proc
rl w0 x2-a16+a186; w0:=cpu-mask
so w0 2.1 ; if cpu0 is not allowed then
jl i16 ; goto next proc else
sl w0 2047 ; if proc is started then
jl i16 ; goto next proc else
sn w2 (b2) ; if proc already is in front then
jl (h7) ; return
jl w3 d5 ; else remove proc
rl w1 b2 ; and
jl w3 d6 ; link proc in front
jl (h7) ; return
; init cpu1
d27: rs w3 h7 ;
rl w3 b65 ; w3:=base of controller descr table;
al w1 c26 ; w1:=power up entry for cpu1;
rs w1 x3+20<3+a310;
al w2 0 ; select cpu1
jl w1 d21 ; start cpu(i)
i15: rl w0 b51+0 ; wait for ready signal
se w0 2 ; from cpu1
jl i15 ;
jl w1 d20 ; stop cpu1
jl (h7) ;
h4: 0
h5: 0
h6: 0
h7: 0
e.
c15: ; interrupt at cpu1
am (b58) ;
rl w1 b56 ; w1:=current process cpu1
rx w1 b1 ; b1:=current process cpu1
rs w1 b57 ; save(current process)
jl (b55) ; goto interrupt service for cpu1-process
b. h10,i10 w.
c26: al w3 h0 ;#1 init cpu1
gp w3 b91 ;#1 set inf register addr;
rl w3 b65 ;#1 base of controller descr addr
al w1 c27 ;#1
rs w1 x3+20<3+a310;#1 set start addr
ri a179 ;#1 return interrupt;
c27: ;#1
al w3 2 ;#1
rs w3 b51+0 ;#1 cpu1 is ready
i1: am (b58) ;#1
rl w2 b56 ;#1 current process(cpu1)
sn w2 0 ;#1 if no proc then
jl i1 ;#1 go test and wait else
al w1 h1 ;
gp w1 b91 ;#1 w1:=inf reg(cpu1)
i0: dl w0 x2+a170 ;#1 set user exception addr and
ds w0 x1+a325+a328;#1 user escape addr
al w0 x2+a28 ;#1
rs w0 x1+a325+a326;#1 set register dump addr;
ri a179 ;#1 return interrupt;
;#1 system table: monitor mode
0 ; -5 monitor call service addr
h6 ; -3 interrupt service addr
1<23+0 ; -1 status interrupt limit
h0=k-13
h1=k-1 ; inf addr: monitor mode
h2=k+11 ; inf addr: user mode
h3 ; +1 register dump addr
0 ; +3 exception service addr
0 ; +5 escape service addr
;#1 system table: user mode
h4 ; -5 monitor call service addr
h5 ; -3 interrupt - -
1<23 + 6 ; -1 status < 12 + interrupt limit
0 ; +1 register dump addr
0 ; +3 exception service addr
0 ; +5 escape service addr
;#1 monitor register dump addr
h3: 0 ; w0
0 ; w1
0 ; w2
0 ; w3
1<23 ; status monitor mode
c27 ; ic start cpu1 process
0 ; cause
0 ; sb
0 ; cpa
0 ; base
8 ; lower write limit
8.3777 7777 ; upper write limit
0<12 + 6 ; interrupt limits
;#1 interrupt service cpu1
h4: am c0-c1 ;#1 monitor call service addr
h5: am c1-c8 ;#1 interrupt service addr (level 1)
h6: al w1 c8 ;#1 interrupt service addr (level 2)
sn w2 14 ;#1 if cpu(i) is interrupted from cpu0 then
jl d22 ;#1 goto wait for start
rs w1 b55 ;#1 set interrupt service addr
ld w1 -100 ;#1
rs w1 b58 ;#1
rx w1 b56 ;#1 clear user addr for cur proc(cpu1)
hs w0 x1+a186 ;#1 clear cpu user bit
i7: rl w3 b65 ;#1 base of controller table
rl w1 x3+20<3+a313;#1 w1:=interrupt level
do w1 (x3+20<3+a312);#1 interrupt(cpu0)
sx 2.111 ;#1 if buserror then
jl i7 ;#1 repeat data out;
jl d22 ;#1 goto wait for interrupt
e.
c. a420
; interrupt service for interrupt caused of data out instructions on
; other computers (HC8000's)
;
; do wreg dev addr
; 1<23+addr<3+ 2.001 start iccm-dma
; 1<23+ 0<3+ 2.011 reset iccm-dma
; message 1<23+ dev<3+ 2.101 message to fifo(dev)
; 1<23+ 0<3+ 2.111 not used
;
;
; di wreg dev addr
; 1<23+ 0<3+ 2.001 next fifo to wreg
; 1<23+ f<3+ 2.011 reset fifo
; wu 1<23+ 0<3+ 2.101 input one word from another
; computer wu = word addr (call)
; = word (return)
; wt 1<23+ 0<3+ 2.111 wt:=own computer number
;
;
; block-transfer message to fifo(dev)
; -2 used used
; addr+0 device number (other computer) device number
; +2 number of halfwords to cop y 1
; +4 first addr (other computer) message
; +6 first addr (this computer) not used
;
;
; -2 used
; f +0 fifi start addr
; +2 fifo last addr
; +4 fifo length (words)
; +6 not used
;
;
; format of a fifo element
; ------------------------
; ! dev<12 + sender !
; !----------------------!
; ! message !
; ------------------------
; message:
; 1<23 + 0<3 + 2.00<1 +0 hresponse: message ok
; 1<23 + 0<3 + 2.01<1 +0 hresponse: message not ok
; 1<23 + addr<3 + 2.10<1 +0 hmess: message, addr=buffer addr
; 1<23 + op<3 + 2.11<1 +0 immediately operation without hresponce
;
;
; procedure next from fifo
b. i5, h5 w.
c20: di. w2 (h0.) ; w2:=reciever<12 + sender
sx 2.111 ; if buserror then
jl c99 ; return interrupt
bz w2 x2+1 ; w2:=sender
di. w3 (h0.) ; w3:=address
sx 2.111 ; if buserror then
jl c99 ; goto interrupt return
sz w3 2.100 ; if hmess then
am b106-b107; start sysrec else
rl w1 b107 ; start systrm
ds w3 x1+a30 ; saved w1:=sender, saved w2:=address
am -2 ;
i0: am -2 ; start sysdma
i1: am -2 ; start systrm
i2: al w2 12 ; start sysrec
rs w2 x1+a28 ; saved w0:=if return(dma-tran) then 8 else 6
al w0 a95 ;
al w3 c99 ;
jl d10 ; start process
c21: rl w1 b108 ; w1:=addr(sysdma)
jl. i0. ;
c22: rl w1 b107 ; w1:=addr(systrm)
jl. i1. ;
c23: rl w1 b106 ; w1:=addr(syssysrec)
jl. i2. ;
h0: 1<23 + 0<3 + 2.001; data in dev addr for input next fifo
e.
z.
?,l./g34:/,l./i0/,r/s /s./,r/0 /0./,
l./i0)/,r/l /l./,r/) /.)/,l1,l./i0)/,r/l /l./,r/) /.)/,
l1,r/l /l./,r/0 /0./,
l./d74:/,r/s /s./,r/i3 /i3./,
l./i3)/,r/l /l./,r/3) /3.)/,l./;bit/,d./g63:/,i/
b. i10 w.
d29: rx. w0 i7. ; save return
rs. w3 i1. ;
i3: se. w0 (i2.) ; if procedure is in use then
jl. i3. ; wait
rx. w0 i7. ;
rs. w3 i1. ; else start
jl. i4. ; goto start
d28: rx. w0 i8. ;
rs. w3 i2. ;
i6: se. w0 (i1.) ;
jl. i6. ;
rx. w0 i8. ;
rs. w3 i2. ;
i4: am. (i0.) ;
ds w1 2 ;
am. (i0.) ;
ds w3 6 ; save(w0,w1,w2,w3)
al w1 8 ;
i5: dl w0 x1+2 ;
am. (i0.) ;
ds w0 x1+2 ;
al w1 x1+4 ;
sh w1 199 ;
jl. i5. ;
wa. w1 i0. ;
rs. w1 i0. ;
ld w3 -100 ;
ds. w3 i2. ;
dl w3 x1-194 ;
dl w1 x1-198 ;
jl x3 ; return
i0: 38000 ;
i1: 0
i2: 0
i7:0
i8:0
e.
/,f
$procs
;********************
l./b16:/,l./;30:(type/,d,i/
e15 ; 30: set cpu mask (or lookup cpu mask) 'cpumask'
c. a420
e16 ; 32: select or remove master process 'systemaddr'
e17 ; 34: move-buff 'sendfurther'
z.
c.-a420
/,l 3,i/
z.
/,l./d15:/,l./x1+a250/,l1,i/
c. a420
rl w3 x1+a192 ; process type
sl w3 3 ; if mirror proc then
rl w1 x1+a190 ; calling proc:=master proc
z.
/,l./d16:/,l./x1+a250/,l1,i/
c. a420
rl w0 x1+a192 ; process type
sl w0 3 ; if mirror proc then
rl w1 x1+a190 ; calling proc:=master proc
z.
/,l./jl(i3)/,r/jl(i3) /jl. (i3.)/,
l./e0:/,l-20,l./i40:/,l./e./,l1,i/
c. a420
;
; procedure test other computers
; if current proces has performed a call of
; create internal process (other computers)
; start internal process (other computers)
; stop internal process (other computers)
; modify internal process (other computers)
; remove internal process (other computers or own computer)
; then ther is selected and initialized a message buffer
;
; - 10 0
; - 8 -1
- 6 0
; - 4 -1
; - 2 0
; buf + 0 next buf
; + 2 prev buff
; + 4 receiver (=master process)
; + 6 sender (=calling process)
; + 8 1<22 + monitor procedure number (56,58,60,62 or 64)
; +10 saved w0 (from calling process)
; +12 - w1 -
; +14 - w2 -
; +16 - w3 -
;
; and the buffer is linked to the master process (this computer)
;
; call w2=curr+a16 w3 =return
; return: w2 is unchanged
;
b. h10,i10 w.
;
d40:
rl w1 b105 ; w1:= master
sn w1 0 ; if master not present then
jl x3 ; return
sn w1 x2-a16 ; if calling proc =master proc then
jl x3 ; return
rl w1 x2-a16+a33; w1:=ic.cur
bz w1 x1-1 ; w1:= monitor procedure number
sh w1 64 ; if munber > 64 or
sh w1 55 ; number <56 then
jl x3 ; return
rs. w1 h1. ; save monitor procedure number
ds. w3 h3. ; save(w2,w3)
sn w1 64 ; if remove process then
jl. i2. ; goto set up buff
se w1 56 ; if not create internal process then
jl. i0. ; goto search name
rl w1 x2-a16+a29; w1:=saved w1
rl w1 x1+8 ; w1:=mode
sl w1 0 ; if mode>0 then
jl x3 ; return
jl. i2. ; else goto select buff
i0: rl w2 x2-a16+a31; w2:=saved w3
jl w3 d11 ; search name
jl. i5. ; if not found then return
rl w3 x3 ; else w3:=proc
rl w0 x3 ; w0:=kind
se w0 0 ; if not internal proc then
jl. i5. ; return
rl w0 x3+a192 ; w0:=proc type
sh w0 2 ; if not mirror process then
jl. i5. ; return
i2: rl w1 b105 ; w1:=master proc
bz w0 x1+a19 ;
bs. w0 1 ; decrease buffer claim
hs w0 x1+a19 ;
rl w2 (b8) ; w2:=next buff
al w0 0 ; set up message buff
rs w0 x2+a158 ;
rs w0 x2+a139 ; buf - 2 :=0
al w0 -1 ;
rs w0 x2+a156 ; - 6 :=-1
rs w0 x2+a154 ; - 4 :=-1
rl. w3 h2. ;
al w3 x3-a16 ;
rs w3 x2+a142 ; + 6 :=sender
rl. w0 h0. ;
wa. w0 h1. ;
rs w0 x2+a145 ; + 8 := 1<22 + monitor procedure no
dl w1 x3+a29 ; +10 := w0.sender
ds w1 x2+a145+4 ; +12 := w1.sender
dl w1 x3+a31 ; +14 := w2.sender
ds w1 x2+a145+8 ; +16 := w3.sender
jl w3 d5 ; remove buf
al w3 c99 ;
jl. d16. ; deliver message and goto interrupt return
i5: dl. w3 h3. ;
jl x3 ; return
h0: 1<22
h1: 0
h2: 0
h3: 0
e.
z.
/,l./e10:/,l-1,r/i8/i20/,l./e11:/,l./jl.d15./,d,i/
c. a420
rl w0 x2+a158 ; w0:=result;
sl w0 1 ; if result = monitor result then
z.
c. -a420
jl. d15. ; goto deliver answer else
z.
c. a420
rl w0 x2+a158 ;
rl w1 x2+a142 ; w1:=sender
ds. w1 i11. ; save switch,sender
ld w0 -100 ;
ds w0 x2+a156 ; clear buff(other comp),receiver-sender,
rs w0 x2+a154 ; proc descr addr
dl w0 x2+12 ; move saved w0-w1 to
ds w0 x1+a29 ; sender
dl w0 x2+16 ; move saved w2-w3 to
ds w0 x1+a31 ; sender
jl w3 d106 ; remove buff
dl. w1 i11. ; restore switch,sender
am (0) ; case switch of
jl. 2 ;
i12: jl. i12. ; not possible
jl. i13. ;
jl. i14. ;
jl. i15. ;
i13: rl w1 (b6) ;
jl. e1. ;
i14: jl. e57. ; link cur to procfunc
i15: al w3 c99 ; deliver message
jl. d15. ; and return interrupt
i10: 0
i11: 0
z.
/,l./e57:/,l./rlw1(b6)/,i/
c. a420
jl. w3 d40. ; check mirror process
z.
/,l./e47:/,l-6,i/
; set cpu mask
; saved w0 new cpu mask result=if new cpu mask=0 then old cpu mask else
; new cpu mask
; saved w1
; saved w2
; saved w3
b. w.
e15: rl w2 x1+a28 ; w2:=new cpu mask
se w2 0 ; if new cpu mask<>0 then
hs w2 x1+a187 ; set new cpu mask
bz w2 x1+a187 ; load result
rs w2 x1+a28 ;
jl c99 ; return
e.
;
c. a420
; procedure select or remove master proc
; saved w0=0 for remove
; 2 for select
; 4 for set systrm addr
; 6 for set sysrec addr
; 8 for set sysdma addr
; saved w3= proc addr (in the 3 last cases)
b. i5 w.
e16: rl w2 x1+a28 ; w2:=saved w0
sl w2 3 ; if set proc addr then
jl. i0. ; goto i0
rs w2 x1+a192 ; select or remove master
se w2 0 ; if select then
al w2 x1 ; set current master
rs w2 b105 ; else remove current master
jl c99 ; return interrupt
i0: rl w0 x1+a31 ; saved w3
am x2-2 ;
rs w0 b106 ; set proc addr
jl c99 ; return interrupt
e.
;
; procedure move buff(sender,receiver);
; saved w0 result
; saved w1
; saved w2 buf
; saved w3 receiver
;
b. h5 w.
e17: jl w3 d101 ; check and search name
jl r3 ; if process do not exist then result 3
rs. w3 h0. ; save receiver
jl w3 d12 ; check buf
jl w3 d5 ; remove buf
bz w0 x1+a19 ;
ba. w0 1 ; increase buffer claim
hs w0 x1+a19 ;
rl w0 x1+a28 ; w0:=result
rl. w1 (h0.) ; w1:=reciever
al w1 x1+a15 ;
jl w3 d6 ; link buf
al w1 x1-a15 ;
bz w3 x1+a19 ;
al w3 x3-1 ; decrease buffer claim
hs w3 x1+a19 ;
rs w0 x2+4 ; set result
al w3 c99 ;
jl d10 ; link proc and return interrupt
h0: 0
e.
z.
/,l./b087:/,l1,r/ a/jl.0;wait forever/,
f
$disc
;********************
$fpaline
;********************
$host
;********************
$fpasub
;********************
$tabinit
;********************
l./f5=k/,i/
2.000 000 000 001 ; cpu mask: only cpu(0) allowed
0,r.(:a16-a48:)>1
/,l./b2,b2/,r/b2,b2/f22,b2/,
l./h2=k/,l1,i/
; dummy internal process(cpu1):
2.000 000 000 010 ; cpu mask: only cpu(1) allowed
0,r.(:a16-a48:)>1
f22=k
f21=k-a16 ; start of dummy process(cpu1)
b2, f5+a16 ; timer q links: initially single in queue
r.(:a17-a16-2:)>1
h11, h12 ; first, top of process
r.(:a19-a18:)>1
0<12+0 ; claims
0<12+0 ;
r.(:a301-a21:)>1
1<23 - 2 ; priority = almost greatest integer
r.(:a27-a301:)>1
h11 ; interrupt address
r.(:a170-a27:)>1
h11 ; escape address
0 ; all params
r.(:a28-a171:)>1
rl w3 132 ; dummy loop
rs w3 x3 ;
jl 0 ;
0 ; w3
r.(:a32-a31:)>1
1<23 ; status
r.(:a33-a32:)>1
0 ; ic
r.(:a181-a33:)>1
8 ; cpa
0 ; base
8 ; lower write limit
2047<12 ; upper write limit
b54 ;+0<12 ; interrupt levels
r.(:a302-a185:)>1
0 ; save area address
r.(:a303-a302:)>1 ; (fill up for save area, used during upstart)
m. dummy internal reg dump(cpu1)
h11: ; register dump
0,r.a180>1 ;
h13: rl w0 132 ; own process desc addr
rs. w0 4 ;
jl. -4 ;
0
h12=k ; top addr of dummy proc(cpu1)
/,l./segment5:i/,l./g5:/,l1,i/
rs. w2 g17. ;
al w2 a352 ;
rs w2 x3+a186 ; set cpu mask;
rl. w2 g17. ;
/,l./g13:/,l1,i/
g17: 0 ; name table entry
/,
l./g10:/,l./b2+2/,r/f5+a16 /f21+a16/,
f
$procfnc1
;********************
$procfnc2
;********************
l./m151:/,l./a4-4/,r/-4;/+a200;/,f
$s1
;********************
$s2
;********************
$catinit
;********************
f
s. a50,i25,h20,p5 w.
; autoload program for hc8000
;
; communication between
; rh8000 and hc8000
; 1 send autoload command -->
; 2 initialisize and
; 3 <-- send hresponse(addr1)
; 4 send hmess(addr2) -->
; 5 --> input(addr2,addr2+32)
; 6 input monitorcode
; to buf1 and buf2
; 7 (addr2):=1
; 8 --> if (addr)<>0 then
; input(buf(addr2))
; 9 (addr1):=(addr2)
;10 if (addr1)<>0 then <--
;11 if (addr1)=1 then
;12 input monitorcode to buf1
;13 and (addr2):=2 else
;14 input monitorcode to buf2
;15 (addr2):=1
;16 --> while (addr2)=0 goto 16
;17 if (addr)<3 then goto 8
;18 start monitor
;
; addr2-->info block
; *------------------*
; a20: ! comm reg(rh) !
; a21: ! comm reg(rc) !
; a22: ! monitor length !
; ! not used !
; *------------------*
; a25: ! 0 !
; ! length(buf1) !
; ! addr(buf1) !
; ! 0 !
; *------------------*
; a26: ! 0 !
; ! length(buf2) !
; ! addr(buf2) !
; ! 0 !
; *------------------*
;
a0= 20 ; interrupt level for rh8000
a1= 0 ; dev no for rh8000
a2=100 ; hmess stack start addr
;
; dma record format
a10= 0 ; device no
a12= 2 ; halfwords to transfer
a14= 4 ; first addres (other computer)
a16= 6 ; first address (this computer)
a20=10 ; comm reg(rh) addr2
a21=12 ; comm reg(rc) addr1
a22=14 ; addr of monitor length
; dma records abs addresses used to
a25=20 ; 20-26 buf1
a26=28 ; 28-34 buf2
a27=34 ; last off inf block
a30= 51 ; inf reg
a31= 80 ; reg dump addr
a40=256 ; first input addr
; entry from rh8000
al. w0 i20. ; w0:=interrupt table addr
rs w0 8 ; set interrupt table addr
al w1 a2 ; first addr of hmess stack
al w2 x1+4 ; last addr of hmess stack
ds w2 x1+2 ; init hmess record
al w2 2 ; stack length (words)
al w3 0 ;
ds w3 x1+6 ;
ls w1 3 ;
lo. w1 h0. ; w1:=dev addr
di x1 ; reset hmess stack
;
; init. inf reg and system table
;
al w3 a30 ;
rl. w2 h3. ; mode
al w1 a31 ; w1:=reg dump addr
ds w2 x3+1 ;
al. w1 i0. ; mon call addr
al w2 0 ;
ds w2 x3-3 ;
al w1 0 ;
ds w2 x3+5 ; exc. and esc. address
gp w3 26 ; inf-reg:=a30
rs w1 a21 ; clear comm-reg
jd 1<11 ; start
i0: rl. w1 h5. ;
do. w1 (h4.) ; send hresponse(addr1)
jl. 0 ; wait
;
; interrupt: hmess arrived
;
i21: rl. w1 h1. ;
di w2 x1 ; w2:=addr(next hmess record)
sx 2.111 ; if buserror then
jl. p0. ; send hresponse(error)
bz w0 x2+1 ; w0:=sender
se w0 a1 ; if not rh8000 then
jl. p0. ; send hresponse(error)
al w1 a27-a20; halfwords to be transferred
ds w1 a26+a12;
rl w0 x2+2 ; address word from hmess
ls w0 1 ;
ls w0 -4 ; w0:=addr2
al w1 a20 ; first addr (this computer)
ds w1 a26+a16;
al w1 a26 ;
do. w1 (h2.) ; input info-block
sx 2.111 ; if buserror then
jl. p0. ; send hresponse(error)
al w1 a40 ; first input addr
ws w1 a25+a12; - buffer length
rs w1 a26+a16; simulate first addr of last input
jl. 0 ; wait
i20: 0,r.(:a0-1:) ;
i21 ; interrupt addres for hmess interrupt
i22 ; interrupt address for dma-trans completed
i22: ; interrupt: dma trans completed
rs w0 a21 ; comm-reg:=w0 (=1 for buf1 and 2 for buf2 2)
i4: rl w0 a20 ; comm addr
di. w0 (h7.) ; w0:=comm inf
sx 2.111 ; if busserror then
jl. p0. ; send hresponse(error)
sn w0 0 ; if wait then
jl. i4. ; goto i4
al w1 0 ;
rs w1 a21 ; clear own comm reg
se w0 1 ; if not input to buf1 then
jl. i7. ; goto i7
rl w2 a26+a16; w2:=first address(buff2)
wa w2 a25+a12; +buffer length
rs w2 a25+a16; first address(buff1):=w2
al w2 a25 ;
do. w2 (h2.) ; input from buff1(rh8000)
sx 2.111 ; if buserror then
jl. p0. ; send hresponse(error)
jl. 0 ; goto wait
;
i7: se w0 2 ; if not input from buff2 then
jl. i9. ; goto i9
rl w2 a25+a16; w2:=first address(buf1)
wa w2 a26+a12; +length(buf2)
rs w2 a26+a16; first address(buf2):=w2
al w2 a26 ;
do. w2 (h2.) ; input from buf2
sx 2.111 ; if buserror then
jl. p0. ; send hresponse(error)
jl. 0 ; wait
i9: al w3 10 ;
al w2 a40 ; first of monitorcode
i10: dl w1 x2 ; move monitor code
ds w1 x3 ;
al w2 x2+4 ; count
al w3 x3+4 ;
sh w2 (a22) ; if more to move then
jl. i10. ; goto i10
jl 8 ; else start monitor
p0: rl. w1 h6. ; hresponse(error)
do. w1 (h4.) ; send hresponse
jl. 0 ; wait
h0: 1<23 +0<3 + 2.011 ;reset hmess stack
h1: 1<23 +0<3 + 2.001 ;next from hmess stack
h2: 1<23+a1<3 + 2.001 ;start dma trans
h3 : 1<23 ;monitor mode
h4: 1<23+a1<3 + 2.101 ;hmess to rh8000
h5: 1<23+a21<3+ 2.010 ;hresponse
h6: 1<23 +0<3 + 2.000 ;hresponse errror
h7: 1<23+a1<3 + 2.101 ;read in rh8000
e.
▶EOF◀