DataMuseum.dk

Presents historical artifacts from the history of:

RC4000/8000/9000

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about RC4000/8000/9000

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦60176feea⟧ TextFile

    Length: 18432 (0x4800)
    Types: TextFile
    Names: »montabinit«

Derivation

└─⟦667bb35d6⟧ Bits:30007480 RC8000 Dump tape fra HCØ.
    └─⟦4334b4c0b⟧ 
        └─⟦b8ddea98b⟧ »kkmon3filer« 
            └─⟦this⟧ 

TextFile

\f


m.                montabinit - monitor table initialisation

b.i30 w.
i0=81 01 12, i1=15 00 00

; if newtime (i0,i1) > oldtime (a133,a134) then oldtime:=newtime;
c.i0-a133
  c.i0-a133-1, a133=i0, a134=i1, z.
  c.i1-a134-1,          a134=i1, z.
z.

i10=i0, i20=i1

i15=i10/100000 , i10=i10-i15*100000 , i25=i20/100000 , i20=i20-i25*100000 
i14=i10/10000  , i10=i10-i14*10000  , i24=i20/10000  , i20=i20-i24*10000 
i13=i10/1000   , i10=i10-i13*1000   , i23=i20/1000   , i20=i20-i23*1000
i12=i10/100    , i10=i10-i12*100    , i22=i20/100    , i20=i20-i22*100
i11=i10/10     , i10=i10-i11*10     , i21=i20/10     , i20=i20-i21*10

i2:  <:                              date  :>
     (:i15+48:)<16+(:i14+48:)<8+46
     (:i13+48:)<16+(:i12+48:)<8+46
     (:i11+48:)<16+(:i10+48:)<8+32

     (:i25+48:)<16+(:i24+48:)<8+46
     (:i23+48:)<16+(:i22+48:)<8+46
     (:i21+48:)<16+(:i20+48:)<8+ 0

i3:  al. w0  i2.       ; write date:
     rs  w0  x2+0      ;   first free:=start(text);
     al  w2  0         ;
     jl      x3        ;   return to slang(status ok);

     jl.     i3.       ;
e.
j.



b.i0                    ; begin
w.i0: al. w2  i0.       ; make room:
      jl      x3+0      ;   autoloader(end external processes);
      jl.     i0.       ; after loading:
  g70= k-b127 + 2
  k = i0                ;   goto make room;
e.                      ; end
                         h3=g2,  h4=g2,  h5=g2,  h6=g2,  h7=g2,  h8=g2,  h9=g2
h10=g2, h11=g2, h12=g2, h13=g2, h14=g2, h15=g2, h16=g2, h17=g2, h18=g2, h19=g2
h20=g2, h21=g2, h22=g2,                 h25=g2, h26=g2,                 h29=g2
h30=g2, h31=g2, h32=g2, h33=g2, h34=g2, h35=g2,                 h38=g2,

e.    ; end of external process segment
\f




; segment 4: process descriptions
s. k=k, h25, g250, e50, j20
w. b127=k, h25, k=k-2

; name table:
; the table has one entry for each process description.
; an entry contains the address of the corresponding
; process description.

w.
f0:                     ; name table start:
     h22                ; remoter process
   h23                ; host process
   h24                ; clock process
  f18            ; errorlog process
f1:                     ; first device
t.m.                monitor device list in name table included
f2:                     ; first area
     h7, r.a1           ; area part
f3:                     ; first internal
     h8, r.a3           ; internal part
f4:  c98                ; name table end (used by search name)

f13:                    ; first drum chain
     c.(:a113-1:),h9,r.a113,z.
f14:                    ; first disc chain
     c.(:a115-1:),h10,r.a115,z.
f15: 0                  ; chain end


; dummy internal process:

f5=k-a16               ; start of dummy process
     b2, b2            ; timer q links: initially single in queue
r.(:a17-a16-2:)>1
     h1, h2            ; first, top of process
r.(:a19-a18:)>1
     0<12+0            ; claims
     0<12+0            ;
r.(:a301-a21:)>1
     1<23 - 3          ; priority = almost greatest integer
r.(:a27-a301:)>1
     h1                ; interrupt address
r.(:a170-a27:)>1
     h1                ; escape address
     0                 ; all params
r.(:a28-a171:)>1
; the following sequence will be executed in the registers,
; until a technical panel is mounted, and data-switches all zero:
     gg  w3     b97    ; test for panel:
     se  w3     0      ;    if data-switches <> 0 then
     jl         0      ;      goto test for panel;
     0                 ;    (i.e. when panel and dswr=0: an exception will occur here)
r.(:a32-a31:)>1
     1<23              ; status
r.(:a33-a32:)>1
     h0                ; 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

b. i10, j10 w.
h0:  gg  w3  b100     ; test for rc8000 type:
     sh  w3  0        ; if type <> 55 then the dummy loop
     jl      0        ; is executed in the working registers,
     jl.    +0        ; otherwise in core.
; when an exception occurs, registers will be dumped here:
h1:  0, r. a180>1      ; register dump
     dl. w3     j0.    ;    get loop-count;
     rs. w3     h1.+a33-a28; prepare for resuming the quick-loop: ic := 0;

i0:                    ; check for stability of the zero:
     gg  w0     b97    ;    if the dataswitches are not stable for
     se  w0     0      ;      some period then
     re.        h1.    ;      resume the register-loop;
     al  w2  x2-1      ;    (i.e. a short period of zeroes will not
     se  w2     0      ;      destroy the algorithm)
     jl.        i0.    ;    goto check for stability;

i1:                    ; technical-panel loop:
     gg  w0     b98    ;    w0 := regsel switches;
     gg  w1     b97    ;    w1 := dswr register;
     sn  w1    -1      ;    if dswr = all ones
     so  w0     2.111111<1;
     jl.        i2.    ;       and regsel = all ones then
     re.        h1.    ;      resume register-loop;

i2:  sz  w0     1<1    ;    if no-display bit then
     jl.        i1.    ;      goto normal loop;

     sl  w1     8      ;    if legal core-address then
     sl  w1    (b12)   ;      begin
     jl.        i3.    ;
     di  w2  x1        ;      display(core(w1));
     gp  w2     b99    ;      goto normal loop;
     jl.        i1.    ;      end;

i3:                    ; not legal address:
                       ; used for displaying the cpu-load
     al  w2     0      ;
     rl  w3     b11    ;    cputime := slice
     aa. w3     f5.+a36+2;           + runtime.dummyprocess;
                       ; (notice: if the dummy process is interrupted
                       ;          between the above two instructions,
                       ;          the cputime may not be consistent,
                       ;          but this is not considered any harm)
     ss. w3     j1.    ;
     al  w0     a85    ;    if cputime is not updated
     ls  w0  x1        ;      enough then
     sl  w0  x3        ;      goto normal loop;
     jl.        i1.    ;

     ds. w3     j2.    ;    cpu incr := new cpu time - old cpu time;
     aa. w3     j1.    ;    old cpu time := new cpu time;
     ds. w3     j1.    ;

; get real-time increment:
     dl  w3     b13+2  ;
     dl. w1     j3.    ;    real incr := new time - old time;
     ds. w3     j3.    ;    old time := new time;
     ss  w3     2      ;

     dl. w1     j2.    ;
     nd  w1     3      ;
     nd  w3     7      ;
     fm. w1     j4.    ;    5pct := cpu incr * 20.0
     fd  w1     6      ;            div(real incr);

     cf  w1     0      ;

; take some kind of arithmetic mean:
     ws. w1     j5.    ;
     as  w1    -1      ;
     wa. w1     j5.    ;    5pct := (5pct - old 5pct) shift (- xx)
     rs. w1     j5.    ;      + old 5pct;

     al  w0    -1      ;
     ls  w0  x1+4      ;    display( (-1) shift (5pct + 4) );
     rl. w2     j6.    ;    flicker := flicker shift (-1);
     ls  w2    -1      ;
     sn  w2     0      ;    if no bits left in flicker then
     al  w2     1<3    ;      flicker := 1 shift 3;
     rs. w2     j6.    ;    (i.e. flicker is one out of four bits to the rigth)
     wa  w0     4      ;    add flicker to cpuload;
     gp  w0     b99    ;    (i.e. use the leftmost 20 bits, 5 pct each)
     jl.        i1.    ;    goto normal loop;

j0=k+2, 100000, 0      ; loopcount, zero
j1=k+2, 0, 0           ; old cpu time
j2=k+2, 0, 0           ; cpu incr
j3=k+2, 0, 0           ; old time
f.
j4:  20.0              ; 5-pct factor
w.
j5:  0                 ; old 5pct
j6:  0                 ; flicker
e.                     ; end of dummy process
h2=k                   ; top of dummy process
\f




; external processes.

; dummy external process:

     0,0,0,0,0
     0,r.4,-4
     jl w2 c51,k,k-2,0,0,jl (b20)
     0,r.a401,0,0,0
h4:  00,<:<0><0><0>dummy:>,0
     0,0,0,k,k-2,0

; remoter process:

     0,r.a401,0,a107,a108-1
h22: 56,<:remoter:>,0
     0,0,-1,k,k-2,0

; host process:

     0,r.a401,0,a107,a108
h23: 90,<:host:>,0,0
     0,0,0,k,k-2,0

; clock process:

     0,0,0,0,0
     0,r.4,0
     jl w2 c50,k,k-2,0,c35,jl w1 c30
     0,r.a401,0,a107,a108-1
h24: 02,<:clock:>,0,0
     0,0,0,k,k-2,0


; errorlog process
      0,r.a401,0,a107,a108-1
f18 : 54, <:errorlog:>,0
      0,0,0,k,k-2,0
      0,r.40



; peripheral processes:
f19=k       ; start
t.m.                monitor peripheral process descriptions included

f20=k       ; top

; external interrupt table:
;
b53: c2                ; integer interrupt etc:
     c2                ;
     c2                ;
; the next entries pertain to various cpu- or system faults:
     c3                ; limit violation (due to monitor bugs)
     c4                ; bus error , during operand transfer
     c5                ; bus error , during instruction fetch
     c6                ; power failure
     h24+a240          ; clock
; the remaining entries are inserted via the monitor options:
t.m.                monitor interrupt table included

b54 = (:k - b53:) > 1 - 1; max interrupt number

; controller description table:
;
; each entry consists (initially) of:
;   entry + a310 : (irrellevant)
;   entry + a311 : device descr + a230
;   entry + a312 : cpu-address (=a198)
;   entry + a313 : interrupt number
f16:                   ; start of controller table:
t.m.                monitor controller table included
f17:                   ; top   of controller table



a114=a114+a88+2, a114=a114+(:a114 a. 1:)
a116=a116+a88+2, a116=a116+(:a116 a. 1:)

a127=(:f2-f1:)>1        ; number of peripheral processes

; area processes:
  f7=k, h7=f7-a349
; internal processes:
  f8=f7 + a1*a2, h8=f8+4
; drum chains:
  f11=f8 + a3*a4, h9=f11+a88+2
; disc chains:
  f12=f11 + a113*a114, h10=f12+a88+2
; message buffers:
  f9=f12 + a115*a116, f10=f9 + a5*a6 - 2

; monitor entries used globally:
  b29 = h8  ; first internal process
  b35 = d5  ; remove
  b36 = d6  ; link
  b40 = d73 ; max base - (1,1)
  b41 = d74 ; follow chain
  b42 = d71 ; search name(name, entry, base)
  b43 = d75 ; regretted message
  b44 = d5  ; remove(elem)
  b45 = d72 ; max base

b.i1                    ; begin
w.i0: rl. w2  i1.       ; make room:
      jl      x3+0      ;   autoloader(chaintable end + 2);
  i1: f10+2             ; after loading:
      jl.     i0.       ;   goto make room;
e.                      ; end
i.
  h25=k - b127 + 2
e.    ; end of process description segment

  k = b29-4 + a3 * a4 + a5 * a6 + a113*a114 + a115*a116
; comment: k = absolute top address of monitor.
\f



; segment 5: initialize monitor
; this segment initializes monitor table, process descriptions,
; and buffers within the monitor as follows:
; monitor table:
;      initialized as defined on page 6
; area process descriptions:
;      description address is placed in name table
;      description is initialized to zero
;      kind is set to 4
; internal process descriptions:
;      description address is placed in name table
;      description is initialized to zero
;      identification bit is set to 1<n
;      next and last event are set to next event
; message and console buffers:
;      buffer is initialized to zero
;      buffer is linked to pool
; after return to the autoloader, the segment is removed.

s.k=k, g30              ; begin
w.b127=k, g30, k=k-2
w.g1: rs. w3  g8.       ; start:

; get number of storage bytes
     al  w1  x3+2046   ;  w1:=address higther than top of loaded monitor
     sh. w1     (g19.) ;  start addr < 200000 then
     rl. w1     g19.   ;  start addr:=200000
     al  w0     0      ;
g20: do  w0  x1        ;   clear core
     sx         2.111  ;   if exception then
     jl.        g21.   ;   goto set core size
     al  w1  x1+2      ;    count:
     jl.        g20.   ;   goto clear
g21:
     gp  w1     b92    ;    systemreg := core size;
     rs  w1     b12    ;    save core size in monitor table

; initialize other parts of monitor table:
     al. w3     g10.   ;
g16: dl  w2  x3+2      ;
     al  w3  x3+4      ;
     rs  w2  x1        ;
     se  w1     0      ;
     jl.        g16.   ;

; initialize base of controller table:

     rl  w1     b67    ;
     rl  w2  x1+a311   ;
     rl  w2  x2-a230+a235;    w2:= device addr (first device descr);
     ls  w2     1      ;
     ls  w2    -1      ;
     ws  w1     4      ;
     rs  w1     b65    ;

     rl  w2  b4        ; name table:
g0:  rl  w0 (x2+a10)   ;
     sn  w0  86        ;
     jl.     g7.       ;
     se  w0  88        ;   if kind(proc)=fparec,trm then
     jl.     g2.       ;     initiate first,top own area;
g7:  rl  w3  x2        ;
     dl. w1  g13.      ;
     ws  w0  6         ;
     ws  w1  6         ;
     ds  w1  x3+a221   ;
g2:  al  w2  x2+2      ;
     se  w2 (b5)       ;
     jl.     g0.       ;

      al  w0  0         ;
      rl  w2 (b5)       ;
      al  w2  x2+a349   ;
  g3: rs  w0  x2        ;
      al  w2  x2+2      ;   for addr:= name table(first area)
      sh  w2 (b8+6)     ;   step 2 until console pool end
      jl.     g3.       ;   do word(addr):= 0;
      rl  w2  b5        ;   entry:= first area;
      rl  w3  x2+0      ;   proc:= name table(entry);
      al  w0  4         ; area process:
  g4: rs  w3  x2+0      ;   name table(entry):= proc;
      rs  w0  x3+0      ;   kind(proc):= 4;
      al  w2  x2+2      ;   entry:= entry + 2;
      al  w3  x3+a2     ;   proc:= proc + area proc size;
      se  w2 (b6)       ;   if entry <> first internal
      jl.     g4.       ;   then goto area process;
      rl. w0  g9.       ;   id bit:= 1 shift 23;
      rl  w3  x2        ;    proc:=name table(entry);
                        ; internal process:
      al  w0     0      ;    halfword:=0;
      bz. w1     g9.    ;    id-bit:=2.1000 0000 0000
g5:   rs  w3  x2        ;    name table(entry):=proc;
      hs  w0  x3+a14    ;    id-bit(proc):=id-bit;
      hs  w1  x3+a14+1  ;    halfword(proc):=halfword;
      ls  w1  -1        ;    id-bit:=id-bit shift (-1);
      se  w1  0         ;    if id-bit.halfword<>0 then
      jl.     g14.      ;    goto g14
      ba. w0  1         ;    else halfword:=next halfword;
      bz. w1     g9.    ;    id-bit:=2.1000 0000 0000
                        ;    set queue:
g14:  al  w3  x3+a15    ;    next(event q(proc) ):=
      rs  w3  x3        ;    last(event q(proc) ):=
      rs  w3  x3+2      ;    event q(proc);
      al  w3  x3+a4-a15 ;    proc:=next proc;
      al  w2  x2+2      ;
      se  w2 (b7)       ;    if if entry<> name table end then
      jl.     g5.       ;    goto internal process;
      al  w1  a46       ; claims rel addr:=first claim
      al  w0  0         ;
c.   (:a113-1:)
      rl  w2  b22       ;   entry:= first drum chain
      rl  w3  x2        ; chain:= nametable(entry)
  g11:rs  w3  x2        ; nametable(entry):=chain
      rs  w0  x3-a88+16 ; state(chain):= free
      rs  w1  x3-a88-2  ; claims rel addr(chain):=claims rel addr
      al  w2  x2+2      ; entry:=entry+2
      am      a88+2     ;
      al  w3  x3+a114-a88-2; chain:=chain+drumchain size
     al  w1  x1+a110*4+4; bs_claims rel addr:=bs_claims rel addr +(max key+1)*4 
      se  w2 (b23)      ; if entry<>first disc chain
      jl.     g11.      ; then goto drum chain
z.
c.   (:a115-1:)
      rl  w2  b23       ;   entry:= first disc chain
      rl  w3  x2        ;
  g12:rs  w3  x2        ;
      rs  w0  x3-a88+16 ;
      rs  w1  x3-a88-2  ;
      al  w2  x2+2      ;
      am      a88+2     ;
      al  w3  x3+a116-a88-2;chain:=chain+discchain size
     al  w1  x1+a110*4+4; bs_claims rel addr:=bs_claims rel addr +(max key+1)*4
      se  w2 (b24)      ; if entry<>chain end
      jl.     g12.      ; then goto disc chain
z.
      al  w1  b8        ;
      rl  w2  b8+4      ;
  g6: jl  w3  b36       ;   for buf:= first buf(mess pool)
      wa  w2  b8+8      ;   step buf size(mess pool)
      sh  w2 (b8+6)     ;   until last buf(mess pool)
      jl.     g6.       ;   do link (mess pool, buf);
      al. w2  g1.       ;
      jl.    (g8.)      ;   autoloader(start);

g8:  0
g9:  1<23
     f19               ;
g13: f20               ;
g19:  200000            ;   lower limit for clear core store

; monitor table initialization:
;
;    address contents

g10:
     b0     , b53 - b16         ;
     b2     , f5+a16            ;
     b2+2   , f5+a16            ;
     b3     , f0                ;
     b4     , f1                ;
     b5     , f2                ;
     b6     , f3                ;
     b7     , f4                ;
     b8+4   , f9                ;
     b8+6   , f10               ;
     b21    , f5                ;
     b22    , f13               ;
     b23    , f14               ;
     b24    , f15               ;
     b30    , f18
     b67    , f16               ;
     b68    , f17               ;
     b72    , b53               ;
     b73    , b54               ;
     b101   , b89               ;
     b102   , a66               ;

; insert in monitor table copies:
     b128+0 , f0                ;
     b128+2 , f1                ;
     b128+4 , f2                ;
     b128+6 , f3                ;
     b128+8 , f4                ;
     b128+10, f9                ;
     b128+12, f10               ;
     b128+14, f13               ;
     b128+16, f14               ;
     b128+18, f15               ;
     b128+22, b86               ;
     
     0 ; end of table

     jl.        g1.             ; after loading: goto start

  g30=k-b127 + 2 
k=g1
;comment: k = absolute first address of initialize monitor
i.
e.   ; end of initialize monitor segment

e.   ; end of monitor block with c, d, e,and f names
▶EOF◀