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

⟦eceb79128⟧ TextFile

    Length: 170496 (0x29a00)
    Types: TextFile
    Names: »tjobstart«

Derivation

└─⟦00964e8f7⟧ Bits:30007478 RC8000 Dump tape fra HCØ.
    └─⟦b2ec5d50f⟧ 
        └─⟦0b92c64d5⟧ »ctb« 
            └─⟦this⟧ 

TextFile

(bjobstart = set 1 disc
bjobstart = slang proc.options proc.jobdescr 
scope user bjobstart
print bjobstart integer words.4 0.6
)

b.  w.
p.1
\f


; btj 20.12.72          contents          boss 2, tjobstart   ...0a...

s. a5, b30, f9, g15, j260, h1  w.   ;
s0=0 ,  s1=1
h0   ,  h1
78 07 14, 134   ; version id:



; codepage 1   (ext 472)
;
; c60      3     job command
; c118     4     job birth
;                    prep bs
;                    create internal
;                    create swop area
;          5         change length of primary out
;                    set bsclaims for job
; c117     6     proc set bsclaim (kit on)
;          7         set param for copy
;          8         modify internal
;          9         start job
;         10     convert
;         12     alarms from code page 1
;
;
; initialization
;         14     init external table
;         16         move definition to ext
;                    create device words
;         17         reserve and move code
;         18         init each incarnation
;
;
; codepage 2   (ext 451)
;
;         21         entries from codepage 5
; c26(abs)22     catproc
; c27     25     set claims
; c25(abs)
;         27     expected finistime
;         27a        create primary output area and process
;         28         init primary output
;         30         reservation of job tape area
;         31         output expected finistime
;
;         33     alarms from codepage 2
\f


; btj 20.12.72          contents          boss 2, tjobstart   ...0b...


; codepage 3   (ext 400)
;
; j36     36     wait for next job
;                trf
;                tre
;         36a    card
; j37     37     online job
;                wait for a job file
; c24(abs)38     prepare jobfile
;         38a    convert from commandio
; j41     39     replace job
;                internal job
; j83     39a    accountjob entry
;         40     run job
;                central read
; c23(abs)46     go job
;         47     command table
;         48     command actions
;                    pres
;                    onli
;                    mini
;                    cbuf
;                    prio
;                    susp
;                    stat
;                    int
;                    buf
;                    area
;                    key
;                    moun
;                    acco
;                    tape
;         48a        size
;                    core
;                    prog
;                    output
;         49         late
;                    time
;                    perm
;         50         temp
;
;         51     alarms from codepage 3
;
;

\f



; sm 75.06.02          contents          boss2, tjobstart   ...0c...

; codepage 4   ( ext 473)
;
; c98     53     device command
; c39     54     include user and wait device
; c36     56     copy area
; c34     57     create job
;         58         reserve all
;
;         58a    alarms from codepage 4
;
; c110    60     request alarm
; c37     63     set alarm claims
; c80     64     create alarm job
;
;
; codepage 5   (ext 471)
;
; c62     66     load command
; c40     72     empty cardreader
\f



; pm 20.12.72          contents          boss 2, tjobstart   ...0d...


; finis cause   finis output                            request output and answers
;
;   0           replaced by job file                    ok
;   1           killed by user                          no psjob idle
;   2           time exceeded                           newjob file not permanent
;   3           (normal finis)                          newjob file not exist
;   4           job file exhausted
;   5           job file unreadable                     jobfile unreadable
;   6           killed by operator
;   7           mode unknown <file>                     user index too large <user>
;   8           output exceeded                         illegal identification <user>
;   9           not special station                     user index conflict <user>
;  10           special station not ordered
;  11           ring not allowed on tape                job file too long
;  12           tape reserved for other project
;  13           stations exceeded at mount
;  14           suspends exceeded
;  15           login claim exceeded
;  16           tape used by other job
;  17           accounts exceeded for fp
;  18           convert file unreadable
;  19           max waiting time exceeded              attention status at remote batch terminal(newjob-convert)
;  20           bad fp                                 device unknown            (newjob-convert-message)
;  21           size too small for fp                  device not printer        (newjob-convert-message)
;  22           no interrupt address                   parent device disconnected(newjob-convert-message)
;  23           mount special after mount              remote batch malfunction  (not used)
;  24           corelock not allowed
;  25           corelock exceeded
;  26           load area in use <file>
;  27           hard error on <file> <status>
;  28           too few resources on <kit>
;  29           job name conflict
;  30           program does not exist <prog>
;  31           size too small
;  32           temp exceeded <file>                  temp exceeded
;  33           replace file unreadable
;  34           replace file too long
;  35           temp exceeded job file
;  36           card deck exceeded
;  37           limited <option>
;  38           option unknown <option>               option unknown <option>
;  39           param at <option>                     param at <option>
;  40           syntax at <option>                    syntax at <option>
;  41           line too long after <option>          line too long after <option>
;  42           device unknown <device>
;  43           hard error on convert file <file> <status>
;  44           job creation impossible
;  45           file is no text file
\f




; pm 8.12.71                    boss 2, tpsjobstart, ...1...
m.          boss 2  tjobstart
a3: k=10000                ;
b0.,  b1.,  b3.,  b4.,  b6.,  b7.
f1.,  f5.,  f2.,  f4.,  f8.,  f9.
j0.,  j1.,  j2.,  j3.,  j4.,  j5.,  j6.,  j7.,  j8.,  j9.
j10., j11., j12., j13., j14., j15., j16., j17., j18., j19.
j20., j21., j22., j23., j24., j25., j26., j27., j28., j29.
j30., j31., j32., j33., j35., j45., j46., j47., j48., j49.
j50., j51., j52., j53., j56., j57., j58., j59., j60., j61.
j62., j63., j64., j66., j67., j68., j69., j70., j44., j38.
j71., j72., j73., j74., j78., j79., j82., j84., j85., j86.
j87., j88., j89., j91., j92., j97., j98., j99., j100.
j101.,j106.,j107.,j108.,j109.,j110.
j112.,j113.,j114.,j115.,j116.,j117.,j118.,j119.,j122.,j123.
j124.,j126.,j127.,j128.,j129.,j130.,j131.,j132.,j65., j76.
j90., j133.,j134.,j135.,j136.,j137.,j42., j54., j138.,j139.
j140.,j141.,j142.,j39. ,j143.,j40. ,j144.,j125.,j145.,j146.
j55. ,j120.,j77. ,j80. ,j81. ,j121.,j147.,j148.,j149.,j150.
j151.,j152.,j153.,j154.,j155.,j156.,j157.,j158.,j159.,j161.
j162.,j163.,j164.,j165.,j166.,j167.,j168.,j169.,j170.,j171.
j172.,j173.,j174.,j94., j95., j160.,j175.,j176.,j177.,j178.
j179.,j182.,j183.,j184.,j185.,j186.,j187. 
c. i178-1, j188., j189. z.
j190.,j191.,j192.,j193.,j194.,j195.,j197.,j198.,j199.
j200.,j201.,j202.,j203.,j204.,j205.,j206.,j207.,j208.,j209.
j210.,j211.,j212.,j213.,j214.,  j216.,j217.

     0                 ;
     am.       (4)     ;
     jl.        2      ;
     g4.               ;    goto initialize;
g3:                    ;    base of psjobdescr
b. c150  w.            ;
p.2                    ;    input psjob descr
g2=  d109              ;    length of psjob descr
g1:                    ;    base of psjob code
\f


; pm 3.2.72                    boss 2, tpsjobstart, ...2...
; codepage 1

b. b90  w.

b61:      0            ;    page 0 base
b14:      0            ;     -   1
          0            ;     -   2
b2:       0            ;     -   3
b11:      0            ;     -   4
     11<12 + 0         ;    page ident:  code page 1
b1:  j140:7            ;    get page
     j145:-2           ;    boss privat interval
b8:  j125:-1           ;
b16: j126:8            ;    page jump
b27: j136:1            ;    send and wait
b28: j127:25           ;    call
b29: j128:26           ;    curr corutine descr
b30: j129:6            ;    open op
b31: j87: 5            ;    lock chained
b33: j130:67           ;    banker que
b35: j137:4            ;    open
b36: j131:3            ;    lock
b63:      <:disc:>,0,0 ;   
b39: j132:288          ;+8  slice length on disc
b65:      <:drum:>,0,0 ;
b64: j44: 287          ;    slice length on drum
     j134: 415         ;
b40: j135: 413         ;   prepare bsadjust
     j7:  415          ;
b42: j119:414          ;    terminate bs adjust
     j65: 473          ;    copy area virt
b62:      c36          ;     -    -   rel
b69: j71: 290          ;    base boss kit table
b70: j72: 291          ;    last   -   -   -
b71: j73: 32           ;    prepare access
b72: j74: 33           ;    terminate  -
b79: j190:74           ;    catalock sem
     j115:415          ;    transfer perm claim virt
b77: j116:428          ;        -      -     -  rel
b80: j86: 233          ;    savebuffer virt.
\f


; pm 3.2.72                    boss 2, tpsjobstart, ...3...


; job <username>, <index>, <project>
b. a3  w.              ;
c60=-b61.              ;
     rl  w1  x3+d23    ;    if named then goto next command;
     se  w1     0      ;
     jl.        a3.    ;

     dl  w1  x3+d11+2  ;    username:= param(1);
     ds  w1  x3+d23+2  ;
     dl  w1  x3+d11+6  ;
     ds  w1  x3+d23+6  ;

     dl  w1  x3+d11+18 ;    w1:= param(3); w0:= param type(3);
     se  w0    -1      ;    if w0 = end element then
     jl.        a1.    ;    begin
     dl  w1  x3+d11+10 ;      w0:= 0; w1:= param(2);
     jl.        4      ;    end else
a1:  rl  w0  x3+d11+10 ;      w0:= param(2);
     ds  w1  x3+d20    ;    index:= w0; project:= w1;

a3:  dl  w1  x3+2      ;    save return
     ds  w1  x3+6      ;
     rl  w0  x3+d69    ;    save login restclaim
     rl  w1  x3+d67    ;
     ds  w1  x3+10     ;
     dl. w3     a2.    ;    w23:= init psjob var;
     jl. w1    (b28.)  ;    call;
     jl.        c120.  ;    user index too big
     jl.        c121.  ;    project or user unknown
     jl.        c122.  ;    user index conflict
     dl  w1  x3+10     ;    get saved login restclaim
     rs  w0  x3+d69    ;
     rs  w1  x3+d67    ;
     al  w1     c38    ;
     rs  w1  x3+d13    ;    command state:= c38;
     bl  w0  x3+d88    ;    if not card job then
     sz  w0     1<5    ;
     jl.        a0.    ;
     bl  w1  x3+d30    ;    remove online card from
     sz  w1     1<8    ;
     al  w1  x1-1<8    ;      std device word and from
     hs  w1  x3+d30    ;
     bl  w1  x3+d65    ;
     so  w1     1<8    ;      max device word;
     al  w1  x1+1<8    ;
     hs  w1  x3+d65    ;

a0:  dl  w3  x3+6      ;    return
     jl.       (b16.)  ;

j4:       159          ;    init psjob var (virt)
a2:  j5:  160          ;     -     -    -  (rel)

e.                     ;
\f


; pm 3.2.72                    boss 2, tpsjobstart, ...4...
b. a9 w.
; job birth

a2:             7      ;    constant pk mask

c118=k-b61

; prepare bs adjust:
     dl. w3     b40.   ;
     jl. w1    (b28.)  ;    prepare bsadjust;
     al  w0     0      ;    swoparea name:= 0;
     rs  w0  x3+d107   ;
     bl  w0  x3+d88    ;
     sz  w0     1<9    ;    if not convert then
     jl.        a8.    ;    begin

     rl  w1     66     ;    set catalog base to boss std interval;
     dl  w1  x1+78     ;
     al  w3  x3+d105   ;
     jd         1<11+72;

; create internal:
     bl  w1  x3+d66-d105; protection key:= first key in
     al  w1  x1-1<8    ;    protection register;
     ns  w1     3      ;
     ac  w1  x1+15     ;   
     la. w1     a2.    ;
     hs  w1  x3+d66+1-d105;  
     al  w1  x3+d53-d105; w1:= addr of job params;
     al  w3  x3+d19-d105; w3:= addr of job name;
     jd         1<11+56;    create process;
     se  w0     0      ;    if result <> 0 then
     jl.        c112.  ;      goto create error;
     jd         1<11+4 ;
     rs  w0  x3+d106-d19;   process descr addr:= process descr addr(proc name);
     rl  w1  x3+d108-d19;  sendertable+0 := process descr addr(proc name);
     rs  w0  x1+0      ;
     dl  w1  x3+d24+4-d19;  set catalogbase(job):=user interval
     jd         1<11+72;    end;
a8:  dl. w1     b8.    ;    set catalog base to boss private base;
     rl. w3     b14.   ;
     al  w3  x3+d105   ;
     jd         1<11+72;
     al  w3  x3-d105+d19;

; create swop area:
     bl  w1  x3-d19+d95;    tailsize:= swoparea length*slicelength
     wm. w1     b39.   ;
     rs  w1  x3-d19+d15;
     al  w1  x3-d19+d15;    w1:= tail addr;
     al  w3  x3-d19+d107;   w3:= swop area name addr;
     al  w0     5      ;    set timer op
     rs  w0  x3+12     ;
     jd         1<11+40;    create area;
     sn  w0     0      ;    if result = 0 then
     jd         1<11+52;    create area process;
     se  w0     0      ;    if result <> 0 then
c.-1, o10, z.          ;    (bossfault xref)
     jd        -10     ;    boss alarm;
     jd         1<11+8 ;    reserve process;
     al  w2  x3        ;    w2:=name addr
     al. w1     0      ;    w1:=dummy mess
     jl. w3    (b27.)  ;    send and wait(dummy)
     bl  w0  x3+d88    ;
     sz  w0     1<9    ;
     jl.        c83.   ;    if not convert then begin

\f


; pm 3.2.72                    boss 2, tpsjobstart, ...5...


; change length of primary output area:
     dl. w1     b8.    ;    set catalogbase to boss privat interval
     al  w3  x3+d105   ;
     jd         1<11+72;
     rl. w3     b11.   ;

     bz  w0  x3+d45    ;    tail size;
     hs  w0  x3+d90    ;    output length:= output;
     wm. w0     b39.   ;
     rl. w3     b11.   ;
     rs  w0  x3+d15    ;
     al  w3  x3+d112   ;    w3:= primary output area name addr;
     al  w1  x3+d15-d112 ;
     jd         1<11+44;

     dl. w3     b42.   ;    terminate and prepare bsadjust
     jl. w1    (b28.)  ;    to update restclaims
     jl.        c111.  ;

; set bs claims for job process
b. a20  w.
     jl. w2     a10.   ;

c117=k-b61             ; kit on:
     rl. w2    (b29.)  ;    w2:=curr coroutine descr
     rl  w1  x2+8      ;    page 4:=page 1 (=job descr)
     rx  w1  x2+14     ;    
     rs  w1  x2+12     ;    page 3:=page 4 (=operation)
     rl. w1     b61.+4 ;  
     al  w2     0      ;    signal buffer free;
     hs  w2  x1+2      ;
a10: rs  w2  x3+4      ;    set start boolean;
     dl. w3     b77.   ;    transfer perm claims;
     jl. w1    (b28.)  ;

     rl  w1     66     ;
     dl  w1  x1+78     ;
     al  w3  x3+d105   ;
     jd         1<11+72;    set catalog base(boss standard);
     al  w0     0      ;
     rs. w0     a0.    ;    login disc entries:=temp incr:=0
c. i30-1, jl.   a9. z. ;
c. -i30 , jl.   a2. z. ;
a17: 0                 ;    work
a0:  0                 ; login disc entries, temp incr.
a4:  0                 ; saved privat kit adr
a5:  0, 0              ; privat kit claim, key 1 and 2.
a6:  0, r.2*4          ; claimlist for jd 1<11+78
a8=k+2, 0, 0           ; saved return and perm claim
c. i30-1
a9:
     rl. w3     b11.   ;    w3:= job descr abs;
     al  w1  x3+d28    ;    w1:= first of private kit table;

a1:  rl  w0  x1        ; next private kit:   w1 = private kit addr.
     sn  w0     0      ;    if kit name = 0 then
     jl.        a2.    ;    goto end set private claims;
     rl. w2     b69.   ;    w2:= base boss kit table;
\f


; re 14.8.74               boss 2, tpsjobstart      ...6...


a3:  al  w2  x2+10     ; next boss kit:   w2:= addr of next boss kit;
     sl. w2    (b70.)  ;    if w2 >= top boss kit then
     jl.        a11.   ;    goto next private kit;
     dl  w0  x2+2      ;    w30:=first of boss kit name
     sn  w0 (x1+2)     ;
     se  w3 (x1)       ;
     jl.        a3.    ;    if no match then goto next boss kit name
     dl  w0  x2+6      ;    w30:= last of boss kit name;
     sn  w0 (x1+6)     ;
     se  w3 (x1+4)     ;    if no match then
     jl.        a3.    ;    goto next boss kit;

     rs. w1     a4.    ;    save private kit addr;
     rl  w0  x1+d57    ;    w0:= perm job claim;
     al. w1     a5.    ;    w1:= claim 1 and 2;   =0.
     jl. w3     a7.    ;    set bs claim;
     rl. w1     a4.    ;
     al  w0     0      ;
     rs  w0  x1+d57    ;
a11: al  w1  x1+14     ;    w1:= next private kit addr;
     jl.        a1.    ;    goto next private kit;
z.


; set bs claim:   w0 = perm claim, w1 = addr of key 1 and 2 claim,
; w2 = addr of kit name and slice length, w3 = return.

a7:  ds. w0     a8.    ;    save return, perm claim;
     bl. w0     a8.+1  ;
     wm  w0  x2+8      ;    w0:= perm slices * slice length;
     bl. w3     a8.    ;    w3:= perm entries;
     ds. w0     a6.+14 ;    save perm claim;
     bl  w0  x1+3      ;
     wm  w0  x2+8      ;    w0:= key 2 slices* slice length;
     bl  w3  x1+2      ;    w3:= key 2 entries + login incr;
     wa. w3     a6.+12 ;
     wa. w0     a6.+14 ;
     ds. w0     a6.+10 ;    key2 claims:=w30+perm claims
     ba. w3     a0.    ;    login entrysum:=login entrysum+loginentries.
     hs. w3     a0.    ;
     bl  w0  x1+1      ;
     wm  w0  x2+8      ;    w0:= key 1 slices * slice length;
     bl  w3  x1        ;    w3:= key 1 entries;
     ba. w3     a0.+1  ;
     wa. w3     a6.+8  ;
     wa. w0     a6.+10 ;    key 1 claims:= key 0 claims
     ds. w0     a6.+6  ;    := key 1 claims + key 2 claims;
     ds. w0     a6.+2  ;
     al  w3  x2        ;    w0:=abs ref device name
     jd         1<11+4 ;    get process description of disc
     sh  w0     0      ;    if not found then
     jl.        a16.   ;    skip
     am        (0)     ;
     rl  w1    +24     ;    w1:=abs ref chain table
     rl  w1  x1-36     ;    w1:=rel ref bs claims in process description
     wa  w1     66     ;    w1:=abs ref bs claims
     al. w3     a6.    ;
a15: sh. w3     a6.+4  ;    if key 0 or 1 then
     jl.        a18.   ;    skip entries
     rl  w0  x3        ;
jd-1
     bz  w0  x1        ;
     sh  w0 (x3)       ;    set min(boss entry claim,computed entry claim)
     rs  w0  x3        ;
jd-1
a18: rl  w0  x3+2      ;
jd-1
     bz  w0  x1+1      ;    w0:=boss slice claim
     rs. w3     a17.   ;    save w3
     wm  w0  x2+8      ;    w0:=boss segment claim
     rl. w3     a17.   ;    reestablish w3
     sh  w0 (x3+2)     ;
     rs  w0  x3+2      ;    set min(boss segm claim,computed segm claim)
jd-1
     al  w1  x1+2      ;
     al  w3  x3+4      ;    if more keys of which to test claims
     sh. w3     a6.+12 ;
     jl.        a15.   ;    then continue
a16:
     rl. w3     b11.   ;
     al  w3  x3+d19    ;    w3:= job name addr;
     al. w1     a6.    ;    w1:= claim list addr;
     jd         1<11+78;    set bs claim; w2 = bs name addr.
     sn  w0     0      ;    if result ok then
     jl.       (a8.-2) ;    return;
     rl. w3     b11.   ;    if start then
     rl  w0  x3+4      ;
     sn  w0     0      ;
     am        -2      ;      call provoke instead of finis;
     jl.        c108.  ;    goto insufficient resources on <w2>;
\f


; re 16.8.74                     boss 2, tpsjobstart   ...7...


a2:  rl. w3     b11.   ; end set private claims:   w3:= job descr abs;
     rl  w0  x3+4      ;
     se  w0     0      ;    if not start then
     jl.        a12.   ;    begin
     dl. w3     b42.   ;    terminate bs adjust;
     jl. w1    (b28.)  ;
c.-1, o13, z.          ;    (bossfault xref)
     jd        -13     ;
     rl. w2    (b29.)  ;    w2:=curr coroutine descr
     al  w1     0      ;
     rx  w1  x2+12     ;    page 4:= page 3 (=operation);
     rs  w1  x2+14     ;    clear page 3;
     rl. w2     b11.   ;
     rl  w2  x2+d108   ;    w2 := sender table entry;
     rl  w1  x2+8      ;    w1 := message buffer address (if any);
     sl  w1     2      ;    if message got then
     bz  w1  x1+8      ;      w1 := message code;
     rl. w2    (b29.)  ;
     rl  w0  x3+d0     ;    if not mount kit then
     se  w1     34     ;
     rs  w0  x2+8      ;      page 1:= job file page;
     se  w1     34     ;    if not mount kit message then
     am         a14    ;    pagejump to psjob io else
     dl. w3     a13.   ;    page jump to answer;
     jl.       (b16.)  ;    (aux page)

     j175:      323    ; answer virt
a13: j176:      350    ; answer rel
     j186:      320    ; psjob io virt
a14=k-a13,j187: 321    ; psjob io rel
a12:                   ;    end;
c.-i27                 ;    if no drum present then
     bz. w0     a0.    ;      temp incr := login disc entries
     hs. w0     a0.+1  ;
z.
     rl  w0  x3+d55    ;    w0:= disc rest key 3;
     al  w1  x3+d58    ;    w1:= addr of disc rest key 1;
     al. w2     b63.   ;    w2:= addr of <:disc:> and slice length;
     jl. w3     a7.    ;    set bs claim;
     rl. w3     b11.   ;
c.i27                  ;    if drum present then begin
     bz. w0     a0.    ;    temp incr := login disc entries;
     hs. w0     a0.+1  ;

\f


; pm 1.5.72                    boss 2, tpsjobstart, ...8...

     rl  w0  x3+d56    ;    w0:= perm drum accumulated;
     al  w1  x3+d59    ;    w1:= addr of drum rest key 1;
     al. w2     b65.   ;    w2:= addr of <:drum:> and slice length;
     jl. w3     a7.    ;    set bs claim;
     rl. w3     b11.   ;    w3:= job descr abs;
z. e.                  ;    end

; lookup prog:
     al  w2  x3+d18    ;    w2:= prog name;
     dl  w1  x3+d24    ;    w01:= std interval;
     jl. w3    (b71.)  ;    prepare access;
     jl.        c109.  ;+2  goto prog does not exist;
     dl  w1  x3+d24    ;
     al  w3  x3+d105   ;
     jd         1<11+72;    set catalog base(standard);
     al  w3  x3-d105   ;
     al  w1  x3+d11+4  ;+4  w1:= tail addr;
     al  w3  x3+d18    ;    w3:= prog name;
     jd         1<11+42;    lookup prog;
     bz  w0  x1+16     ;    w0:= content;
     se  w0     3      ;    if content <> directly executable then
     jl.        c81.   ;    goto prog does not exist;


; modify internal proc:   w1 = param area addr.
     rl  w1     66     ;     set catalogbase(boss std)
     dl  w1  x1+78     ;
     al  w3  x3-d18+d105;
     jd         1<11+72;
     al  w3  x3+d18-d105;
     al  w1  x3-d18+d11+4;
     rl  w0     66     ;    primary input:= primary output
     rs  w0  x1        ;    := parent:= current process;
     rs  w0  x1+2      ;    mw0:= mw2:= current process descr addr;
     rs  w0  x1+4      ;
     rl  w0  x3+d106-d18;   mw3:= process descr addr of job proc;
     rs  w0  x1+6      ;
     al  w0     0      ;
     rs  w0  x1+8      ;    mex:= 0;
     bz  w0  x1+17     ;
     wa  w0  x3+d53-d18;    mic:= entry + first storage addr of job proc;
     rl  w2  x1+18     ;
     wa  w2  x3+d53-d18;
     sh  w2 (x3+d47-d18);   if proglength > jobsize or
     sl  w0 (x3+d47-d18);     entrypoint outside job then
     jl.        c119.  ;    goto size too small
     rs  w0  x1+10     ;
     rl  w0  x1+18     ;    save program length in
     hs  w0  x3+d107+1-d18; swop area name(1);
     al  w3  x3+d19-d18;
     jd         1<11+62;    modify internal;
     se  w0     0      ;    if result <> 0 then
c.-1, o11, z.          ;    (bossfault xref)
     jd        -11     ;    boss alarm;
     al  w0     d18-d107;
     hs  w0  x3+d107-d19;

\f


; pm 3.2.72                    boss 2, tpsjobstart, ...9...

c83: dl. w3     b42.   ;    call(terminate bsadjust)
     jl. w1    (b28.)  ;
c.-1, o12, z.          ;    (bossfault xref)
     jd        -12     ;
     bl  w0  x3+d88    ;
     sz  w0     1<9    ;
     jl.        c84.   ;    if convert then goto convert;
     sz  w0     1<3    ;    if not online then
     jl.        a3.    ;      begin comment prepare for recognition of convert areas;
     rl. w2     b79.   ;      lock(catalock);
     jl. w3    (b36.)  ;
     dl. w1     b8.    ;      set catbase(boss private);
     al  w3  x3+d105   ;
     jd         1<11+72;
     al  w3  x3-d105+d112;  w3 := primout name;
     al  w1  x3-d112+d89;     w1 := lookup area;
     jd         1<11+42;      lookup entry;
     rl  w0  x3-d112+d61;
     rs  w0  x1+10     ;      name table addr(cat entry) := user id;
     jd         1<11+44;      change entry;
     al  w1     2      ;
     jd         1<11+50;      permanent entry(primout, key=2);
     rl. w2     b79.   ;      open(catalock);
     jl. w3    (b35.)  ;      end;
a3:  dl. w3     a1.    ;    call include user;
     jl. w1    (b28.)  ;
     bl  w0  x3+d51    ;    tapes:= tapes + tape count;
     ba  w0  x3+d92    ;
     hs  w0  x3+d51    ;
jl. w1 c131. ; ************************** testudskrift af job descr
     rl  w0  x3+d93    ;
     se  w0     0      ;    if not wait devices then
     jl.        a0.    ;    begin

;start job:
     al  w0     16     ;    opcode:=start job
     hs  w0  x3+d14+2  ;
     rl. w2    (b29.)  ;    virt of swoparea descr:= virt of jobdescr+d107
     rl  w1  x2+8      ;
     al  w1  x1+d107   ;
     rs  w1  x3+d14+4  ;
     al  w1  x3+d14    ;    w1:=opadr
     rl. w2     b33.   ;    w2:=bankerque
     jl. w3    (b30.)  ;    open op(bankerque, start job)
     rl  w2  x3+d82    ;    lock(psjobbuf)
     jl. w3    (b36.)  ;
a0:  rl. w2    (b29.)  ;    end; page 1 descr := jobfile
     rl  w1  x3+d0     ;
     rs  w1  x2+8      ;
     al  w0     0      ;    page 4 descr := 0
     rs  w0  x2+14     ;
     hs  w0  x3+d104   ;    finis cause:= 0;
     jl. w3    (b1.)   ;    get page
j195=k+1
     al  w0     155    ;    abs or page:=ext 155 (i.e. abs addr) (used by primary input)
j139=k+1
     rs  w0  x3+188    ;
jl. w1 c131. ; ************************** testudskrift af job file
     dl. w3     a7.    ;    jump to job running
     jl.       (b16.)  ;

     j67: 320          ;
a7:  j68: 321          ;
     j76: 473          ;    include user virt
a1:       c39          ;       -      -  rel
\f



; pm 24.5.72                    boss 2, tpsjobstart,   ...10...


; convert:

j88:      380          ;    paper sem
j89:      381          ;
j118:     382          ;
j191:     379          ;    paper manipulation
j193:     378          ;    rb printer queue
j194:     377          ;    rb printer wait

b. a9 w.

c84: al  w0     d18    ;
     al  w1     d107   ;
     ds  w1  x3+6      ;

     dl. w3     b62.   ;    call(copy area);
     jl. w1    (b28.)  ;
     jl.        c88.   ;    hard error;
     al  w2  x3+d18    ;
     jl. w3    (b72.)  ;    release acces(prog name);
     rl. w2     b79.   ;
     jl. w3    (b36.)  ;    lock(catalock);
     rl. w2     j118.  ;
     jl. w3    (b31.)  ;    lock chained(convert buf);

     rl. w2     j191.  ;    lock(paper manipulation);
     jl. w3    (b36.)  ;
     rl. w2     b61.+4 ;    w2 := convert operation;
     ld  w1    -100    ;
     ds  w1  x2+42     ;
     ds  w1  x2+46     ;
     rs  w1  x2+2      ;    code;
     rs  w1  x2+14     ;    name table addr;
     dl  w1  x3+d107+2 ;    name;
     ds  w1  x2+8      ;
     dl  w1  x3+d107+6 ;
     ds  w1  x2+12     ; 
     dl  w1  x3+d18+2  ;
     ds  w1  x2+34     ;    op.file:= prog name;
     dl  w1  x3+d18+6  ;    (file in command)
     ds  w1  x2+38     ;
     dl. w1     b8.    ;
     ds  w1  x2+18     ;    interval:= boss private;
     al  w3  x3+d105   ;    set catbase(boss private);
     jd         1<11+72;
     al  w3  x3-d105+d107;
     al  w1  x3+d89-d107;
     jd         1<11+42;    lookup entry;
     rl  w0  x3+d61-d107;
     rs  w0  x1+10     ;    name table addr:=user id;
     bl  w0  x3+d4-d107;
     hs  w0  x1+17     ;    entry point:=paper type;
     jd         1<11+44;    change entry;
     al  w1     2      ;
     jd         1<11+50;    permanent entry(file, key = 2);
     al  w3  x3-d107   ;
\f


; re 20.3.74                 boss 2, tpsjobstart      ...11...

     rl  w1  x3+d20    ;    project;
     rs  w1  x2+20     ;
     dl  w1  x3+d23+2  ;    user;
     ds  w1  x2+24     ;
     dl  w1  x3+d23+6  ;
     ds  w1  x2+28     ;
     rl  w1  x3+d61    ;    user id;
     rs  w1  x2+30     ;
     bl  w0  x3+d95    ;    length;
     hs  w0  x2+4      ;
     dl  w1  x3+d26    ;    set catalog base = project base
     ds  w1  x2+66     ;
     dl  w1  x3+d122   ;    set host description
     ds  w1  x2+50     ;
     dl  w1  x3+d121   ;
     ds  w1  x2+56     ;    set device name
     rl  w0  x3+d123   ;
     rs  w0  x2+62     ;    set device kind
     rl. w3     b14.   ;
     al  w1  x2        ;
     bz  w2  x3+d4     ;    paper;
     hs  w2  x1+5      ;
c. i190-1
     rl  w0  x3+d121-2 ;    w0:=first word of rbprintername;
     sn  w0     0      ;    if convert from rb terminal then
     jl.        a4.    ;
     rl. w2     j193.  ;    openchained(rb printer queue);
     jl. w3    (b30.)  ;
     rl. w2     j194.  ;
     jl. w3    (b35.)  ;    open(rb printer wait);
     jl.        a5.    ;
z.
a4:                    ;    else
     sl  w2     i78-1  ;
     al  w2     i78-1  ;
     al  w3     e13    ;
     wm  w3     4      ;
     al  w2  x3        ;
     wa. w2     j88.   ;
     jl. w3    (b30.)  ;    open chained;
     rl. w2     j89.   ;
     jl. w3    (b35.)  ;    open(printer wait);
a5:  rl. w2     j191.  ;    open (paper manipulation);
     jl. w3    (b35.)  ;
     rl. w2     b79.   ;
     jl. w3    (b35.)  ;    open(catalock);
     al  w0     0      ;    rest converts
     hs  w0  x3+d111   ;    := 0;
     al  w0     3      ;    finis cause:= normal finis;
     hs  w0  x3+d104   ;
     dl. w3     j78.   ;    goto finis;
     jl.        (b16.) ; 
e.e.
\f


; pm 3.2.72                    boss 2, tpsjobstart, ...12...


; alarms from code page 1.

b. a4  w.              ;

c88: dl  w1  x3+d1+2   ;    hard error in copy;
     rs  w0  x3+20     ;    move status;
     se  w1     3      ;
     am         d107-d18;   
     al  w2  x3+d18    ;    w2:= file name addr;
     al  w0    -1      ;    suppress terminate bs adjust;
     bl  w1  x3+d88    ;    if convert then
     sz  w1     1<9    ;
     am         43-27  ; 43:  hard error on convert file
     al  w1     27     ; 27:   hard error on
     jl.        a3.    ;

c112:al  w2  x3        ; create error:
     sn  w0     1      ;
     am         44-29  ; 44: error at create internal process;
     am         1-100  ; 29:   job name conflict
     am         100    ; c108-2: 28:   (provoke instead of finis)
c108:al  w1     28     ; 28:   too few resources on
     rl. w3     b11.   ;
     al  w0     0      ;
     jl.        a3.    ;
c81: am  w0     1      ;
c109:al  w0     0      ;
     rl. w3     b11.   ;
     al  w2  x3+d18    ;
     am        -1      ; 30:   prog does not exist
c119:al  w1     31     ; 31:   size too small (w0=entry > 0)
     rl. w3     b11.   ;
a3:  rs  w0  x3+4      ;
     hs  w1  x3+d104   ;     set finis cause
     dl  w1  x2+2      ;     set param
     ds  w1  x3+14     ;
     dl  w1  x2+6      ;
     ds  w1  x3+18     ;
     al  w2  x3+d18    ;
     rl  w0  x3+4      ;    if called via c88, c81 or c119 then
     se  w0     0      ;
     jl. w3    (b72.)  ;      release access(progname);
     rl. w3     b11.   ;
     rl  w0  x3+4      ;    if not hard error in copy then
     dl. w3     b42.   ;     terminate bsadjust
     sn  w0    -1      ;
     jl.        a4.    ;
     jl. w1    (b28.)  ;
c.-1, o13, z.          ;    (bossfault xref)
     jd        -13     ;+2  claims exceeded
a4:  rl. w1    (b29.)  ;    page 1:= page 4(= job descr);
     rl  w0  x1+14     ;
     rs  w0  x1+8      ;    clear page 2, 3, 4;
     al  w0     0      ;
     rs  w0  x1+10     ;
     rs  w0  x1+12     ;
     rs  w0  x1+14     ;
     rl. w3     b11.   ;
     bl  w2  x3+d104   ;    if finiscause >= 100 then
     al  w0  x2-100    ;    begin
     sl  w2     100    ;      finiscause:= finiscause - 100;
     hs  w0  x3+d104   ;      call provoke instead of finis...
     sl  w2     100    ;    end;
     am        +4      ;
     dl. w3     a2.    ;    goto finis;
     jl.       (b16.)  ;
\f


; pm 15.8.72                    boss 2, tpsjobstart, ...13...


c111:al  w0     2      ;    clean catalog(2,stdint)
     rs  w0  x3+4      ;
     dl  w1  x3+d24    ;
     ds  w1  x3+8      ;
     rl. w0     b80.   ;    page 3 descr := savebuffer
     rl. w1    (b29.)  ;
     rs  w0  x1+12     ;
     dl. w3     a0.    ;
     jl. w1    (b28.)  ;
     al  w1     32     ;
     al  w0     0      ;    (terminate bsadjust := true)
     jl.        a3.    ;
     j84: 495          ;
a0:  j85: 363          ;

c120:am        -1      ; 7   user index too large
c121:am        -1      ; 8   illegal identification
c122:al  w0     9      ; 9   user index conflict
     hs  w0  x3+d104   ;    set finis cause
     dl  w1  x3+d23+2  ;    set param
     ds  w1  x3+14     ;
     dl  w1  x3+d23+6  ;
     ds  w1  x3+18     ;

     dl. w3     a1.    ;
     jl.       (b16.)  ;    goto request alarm;

     j162:417          ;
a2:  j78: 427          ;    finis
     j182:426          ;a2+2
     j183:361          ;a2+4  provoke and finis (finiscause);

     j124:473          ;    request alarm
a1:  c110              ;
e.



b.a6 w. 
a1=k+2, 0, 0
a2=k+2, 0, 0
j142:   21    ; priv...

c131:ds. w1   a1.      ; page 1 output: w1 = return...
     ds. w3   a2.      ;
     rl. w2    (b29.)  ;
     bz  w0  x2+4      ;
     so  w0     2      ;    if -, test 2 then
     jl.        a5.    ;    return;
     rl. w2   b14.     ;
a3:  al  w0   20<6+12  ;
     al  w1   x2       ;
     jl. w3  (j142.)   ;
     al  w2  x2+20     ;
     am.     (b14.)    ;
     sh  w2   +440     ;
     jl.      a3.      ;

a5:  dl. w1   a1.      ;
     dl. w3   a2.      ;
     jl    x1          ;

e.

i. e. ; b names codepage 1
g0=k-g1,




c. d109+f0.-1, h.r. d109+f0., w.z.
\f


; pm 3.2.72                    boss 2, tpsjobstart, ...14...

; initialization:

b. a6  w.              ;

b0:       12           ;    reserve virtual
b1:       13           ;    move to virtual
b3:       15           ;    end init
b4:       24           ;    put in active que
b5:       -1<20        ;    const
b6:       100          ;    first psjob corutine
b7:       0            ;    ext base
          0            ;    work
b8:       0            ;
b9:       e13          ;    
b10: h.   e96,    j36  ;    entry off-line job
b11:      e96,    j37  ;    entry on-line job
b12:      e96,    j83  ;    entry account job
     w.
b13:      <:accountjob:>
b14:      0, 0         ;    account interval
b15:      768          ;    constant chars / segment
b16:      -1           ;    constant -1
b17:      1<23-1       ;    constant
b18:      g1.          ;    start of codepage 1
b19:      g6.          ;      -    -     -    2
b20:      g8.          ;      -    -     -    3
b21:      g10.         ;      -    -     -    4
b2:       g11.         ;      -    -     -    5
b22:      j93.         ;
b23:      j96.         ;
b24:      j75.         ;
b25:      g7           ;    length of code page

; init external table:

g4:  jl. w3    (2)     ;    set externals;
j216:           40     ;

a0:  d14+3 , 324       ;    psjob nr  (byte)
     d107  , 325       ;    dump area spec
     d20   , 326       ;    project no
     d91   , 327       ;    job no
     d19   , 328       ;    job name
     d19+2 , 329       ;       -     +2
     d19+6 , 330       ;       -     +6
     d96   , 331       ;    psjob sem rel = psjob nr * e13
     d87   , 332       ;    psjob operation buffer
     d87+2 , 333       ;       -     -       -     +2
     d87+4 , 334       ;       -     -       -     +4
     d87+6 , 335       ;       -     -       -     +6, banker operation
     d98   , 336       ;    rest mounts
     d99   , 337       ;    rest suspends
     d0    , 338       ;    job file virt
     d2    , 525       ;    total net time
     d104  , 339       ;    finis cause
     d30+2 , 340       ;    device mask
     d65-d30, 422      ;    maxdevice rel to std.device
     d108  , 341       ;    sender table addr
     d106  , 342       ;    proc descr addr
     d61   , 346       ;    user ident in user cat
     d62   , 406       ;    no of useable private kits
     d22   , 407       ;    user cat ref disc rest key 3
     d60   , 408       ;      -  -   -   drum   -  -   3
     d69   , 409       ;    disc rest key 2
     d58   , 410       ;    disc rest key 1
     d67   , 411       ;    drum rest key 2
     d59   , 412       ;    drum rest key 1
\f


; pm 20.4.72                    boss 2, tpsjobstart, ...15...
; initialize

     d15   , 419       ;    tail.size
     d74   , 479       ;    convert claim: entries
     d74+1 , 480       ;                   slices
     d28   , 403       ;    first of private kit table
     c61   , 401       ;    include user
     d111  , 347       ;    rest converts byte
     d43   , 344       ;    mounts  byte
     d111+1, 345       ;    rest accounts byte
     j41   , 402       ;    replace rel
     j36   , 404       ;    off-line job
     j37   , 405       ;    on-line job
     d14+2 , 348       ;    opcode
     d14+4 , 349       ;    2. word of banker op
     d92   , 438       ;    tape count
     d51   , 439       ;    tapes
     d93   , 343       ;    request line
     d24   , 421       ;    standard interval
     d118+4, 371       ;    card reader queue sem
     d119  , 423       ;    rb device name table address
     d122  , 424       ;    rb device creation number
     d121  , 425       ;    rb printer name (last of db-word)
     c85   , 372       ;    priority
     c86   , 373       ;    wait
     c87   , 374       ;    preserve
     c64   , 452       ;    size
     c65   , 453       ;    inte
     c66   , 454       ;    prog
     c67   , 455       ;    buf
     c68   , 456       ;    area
     c69   , 457       ;    key
     c70   , 526       ;   link
     c90   , 458       ;    perm
     c91   , 459       ;    temp
     c93   , 460       ;    late
     c94   , 461       ;    moun
     c95   , 462       ;    outp
     c96   , 463       ;    time
     c97   , 464       ;    acco
     c63   , 465       ;    stat
     c98   , 466       ;    devi
     c99   , 467       ;    tape
     c92   , 468       ;    cbuf
     c89   , 469       ;    susp
     c58   , 484       ;    corelock
     c59   , 483       ;    online
     c56   , 420       ;    minimal
     j111  , 364       ;    banker kill
     c117  , 470       ;    proc set bs claim
     d55   , 475       ;    disc rest key 3
     d56   , 476       ;    drum rest key 
     d77-d14,266       ;    corelock time rel to banker op
     j83   , 492       ;    account job entry
     c36   , 498       ;    rel copy area;
     d1+2  , 499       ;    status, operation (from copy area);
     d79   , 501       ;    cpu used (0.8 sec)
     d85   , 502       ;    temp drum, disc
     d49   , 503       ;    stations
     d47   , 504       ;    top addr
     d53   , 505       ;    first addr
     d146  , 523       ;    ref perm core (rel on job descr page)
     d148  , 527      ;   rel link on job desc
     (:g2+511:)>9,508  ;    length of job descr
     
\f


; re 6.2.75                       boss 2, tpsjobstart   ...15a...

; initialize
     d131  , 148       ;  (left byte = boss reader device, right job contr)
     d132  , 524       ;    priority
     d137  , 376       ;    waiting time
     d140  , 375       ;    no of conversational input lines
     d141  , 149       ;    reader table (rel on job descr page)
     d142  , 173       ;    rel reader table (from reader operation);
     d143  , 172       ;    terminal user rights (rel on jod descr page);
        0  ,-1000      ;    end of externals;

\f


; pm 3.2.72                    boss 2, tpsjobstart, ...16...

     rl  w1     66     ;    ext-4,-3:= boss std interval;
     dl  w2  x1+78     ;    
     rs. w1     j220.  ;    ext(-4);
     rs. w2     j221.  ;    ext(-3);
     al  w2  x1        ;    b14:= account interval;
     ds. w2     b14.+2 ;
     am        -200    ;
     rl. w0     f8.+200;    ext(76):= psjob buf sem;
     rs. w0     j222.  ;    ext(76);
     am        -100    ;
     rl. w1     f2.+100;    ext(151):= first sender table;
     rs. w1     j223.  ;    ext(151);
     al  w1  x1+i45*10 ;
     rs. w1     j224.  ;    ext(153);

; create device words
b. a2  w.              ;
a1=e25-e26
a2=e26+47-e17
     al  w2     e17-3  ;
     am        -101    ;    w01:= 0;
a0:  ld  w1     1      ;    for w2:= no of devices-3 step -1 
     al  w2  x2-1      ;    until no of stations do
     am.       (b24.)  ;
     bl. w3  x2+b24.   ;      w01:= 2*w01 + 
     se  w3    -1      ;      if device table(w2) <> -1 then
     al  w1  x1+1      ;      1 else 0;
     se  w2     e25    ;
     jl.        a0.    ;

     rl. w3     b7.    ;    w3:= ext base;
     ld  w1     a1     ;    w01:= (w01) shift no of proc devices and spec stations;
     ds. w1     b8.    ;    includeable devices:= w01;
     al  w1  x1+1<a1-1 ;      w01:= (w01 + 1 shift no of spec
     ld  w1     a2     ;      stations -1) shift
     wa. w0     b5.    ;    +1<23
     rs. w0     j225.  ;    ext(-6);
     rs. w1     j226.  ;    ext(-5);
     lx. w0     b17.   ;
     lx. w1     b16.   ; 
     rs. w0     j227.  ;    ext(-8);
     rs. w1     j228.  ;    ext(-7);
     dl. w1     b8.    ;   w01:= includeable devices;
     ld  w1     a2     ;
     rl. w2     b23.   ;
     ds. w1  x2+b23.   ;    includeable devices:= w01;
e.
\f


; pm 3.2.72                    boss 2, tpsjobstart, ...17...


; initialize

; reserve and move code:
     rl. w0     j26.   ;    disc slice in byte:= disc slice in segments * 512
     ls  w0     9      ;
     rs. w0     j34.   ;
     rl. w1     j26.   ;    disc slice in chars:=
     wm. w1     b15.   ;    disc slice in segments * 768;
     rl. w2     b22.   ;
     rs. w1  x2+b22.   ;

     al  w0     i80    ;    reserve and move codepage 1
     al  w1     g0     ;
     jl. w3    (b0.)   ;
     rl. w3     b18.   ;
     al. w0  x3+b18.   ;
     jl. w3    (b1.)   ;
     rs. w2     j229.  ;    ext(472);

     al  w0     i80    ;    reserve and move codepage 2
     al  w1     g5     ;
     jl. w3    (b0.)   ;
     rl. w3     b19.   ;
     al. w0  x3+b19.   ;
     jl. w3    (b1.)   ;
     rs. w2     j230.  ;    ext(451);

     al  w0     i80    ;    reserve and move codepage 3
     rl. w1     b25.   ;   
     jl. w3    (b0.)   ;
     rl. w3     b20.   ;
     al. w0  x3+b20.   ;
     jl. w3    (b1.)   ;
     rs. w2     j231.  ;    ext(400);

     al  w0     i80    ;    reserve and move codepage 4
     al  w1     g9     ;
     jl. w3    (b0.)   ;
     rl. w3     b21.   ;
     al. w0  x3+b21.   ;
     jl. w3    (b1.)   ;
     rs. w2     j232.  ;    ext(473);

     al  w0     i80    ;    reserve and move codepage 5
     al  w1     g12    ;
     jl. w3    (b0.)   ;
     rl. w3     b2.    ;
     al. w0  x3+b2.    ;
     jl. w3    (b1.)   ;
     rs. w2     j233.  ;    ext(471);

     jl. w3    (2)     ;    set externals;
j217:           40     ;  

j220:    0  ,    -4    ;    boss std interval upper;
j221:    0  ,    -3    ;    boss std interval lower;
j222:    0  ,    76    ;    psjob answer;
j223:    0  ,   151    ;    first sender table;
j224:    0  ,   153    ;    top sender table;
j225:    0  ,    -6    ;    device bits 2 for banker;
j226:    0  ,    -5    ;    device bits 1 for banker;
j227:    0  ,    -8    ;    device mask 2;
j228:    0  ,    -7    ;    device mask 1;
j229:    0  ,   472    ;    virt codepage 1;
j230:    0  ,   451    ;    virt codepage 2;
j231:    0  ,   400    ;    virt codepage 3;
j232:    0  ,   473    ;    virt codepage 4;
j233:    0  ,   471    ;    virt codepage 5;
         0  ,  -1000   ;    end of externals;

\f


; pm 3.2.72                    boss 2, tpsjobstart, ...18...

; initialize
     dl. w0     b13.+2 ;    jobfilename:=accountjob
     al. w2     f0.+1000;
     al  w2  x2-1000   ;
     ds  w0  x2+d100+2 ;
     dl. w0     b13.+6 ;
     ds  w0  x2+d100+6 ;
     dl. w0     b14.+2 ;    jobfileinterval:=accountinterval
     ds  w0  x2+d101+2 ;
     al  w0     1<2    ;    jobstate:=1<2
     hs  w0  x2+d88    ;
     al  w0     16     ;
     rs  w0  x2+d107-4 ;    harderror op := free;
     al  w0     0      ;    login claims := 0
     rs  w0  x2+d69    ;
     rs  w0  x2+d67    ;
     hs  w0  x2+d104   ;    finis cause:=0;
     al  w2     2      ;    w2:=psjobno:=2

; initialize each incarnation of psjob descr and corutine descr:

a3:  am        -1000   ;
     rs. w2     f3.+1000;    psjob no:= w2;
     al  w2  x2-2      ;
     wm. w2     b9.    ;
     am        -1000   ;
     rs. w2     f7.+1000;    psindex:= (psjobnr - dummys) * e13;

     rl. w3     b6.    ; 
     rl  w0  x3+12     ;
     am        -1000   ;
     rs. w0     f6.+1000;    psjob file descr:= page 3 descr;
     al  w0     0      ;    page 3 descr:=0
     rs  w0  x3+12     ;

     al  w0     i81    ;    w0:= psjob descr on disc;
     al  w1     g2     ;    w1:= length of psjob descr;
     jl. w3    (b0.)   ;    reserve virt for psjob descr;
     am        -1000   ;
     al. w0     g3.+1000;    w0:= base of psjob descr;
     jl. w3    (b1.)   ;    move to virt;


     rl. w1     b6.    ;    w1:= corutine descr;
     al  w2  x2+1      ;    set writebit
     rs  w2  x1+14     ;    page 4 := page 1:= psjob descr;
     rs  w2  x1+8      ;
     rl. w3     b7.    ;
     rl  w0  x3+400<1  ;    page 0 := psjob code;
     rs  w0  x1+6      ;    
     am        -1000   ;

     rl. w3     f3.+1000;    w3:= psjob no;
     se  w3     2      ;    if psjob no = 2 then
     jl.        a4.    ;    begin
     am        -1000   ;      page1descr := jobfiledescr
     rl. w0     f6.+1000;
     rs  w0  x1+8      ;
     rl. w0     b12.   ;      waitingpoint := accountjob entry
     jl.        a5.    ;    end;
\f


; pm 3.2.72                    boss 2, tpsjobstart, ...19...
; initialize

a4:  rl. w0     b10.   ;    if psjob no > i45 - i4 then
     sh  w3     i45-i4 ;    waiting point := on-line entry
     jl.        a5.    ;    else
     rl. w0     b11.   ;    waiting point := off-line entry;
a5:  rs  w0  x1+4      ;    end;
a6:  al  w2     200<3+e96;
     hs  w2  x1+4      ;    store corutine ident;
     al  w2  x2+1<3    ;
     hs. w2     a6.+1  ;    next corutine;
     jl. w3    (b4.)   ;    put in active que;

     al  w1  x1+e12    ; after psjob start:   w1 = corutine, w2 = psjob que.
     rs. w1     b6.    ;    corutine descr addr:= next corutine descr addr;
     am        -1000   ;
     rl. w2     f1.+1000;   w2:=psjobque

     al  w0  x2+e13    ;    psjob que:= next psjob que;
     am        -1000   ;
     rs. w0     f1.+1000;
     am        -1000   ;

     rl. w1     f5.+1000;    psjob in core:= next psjob in core;
     al  w1  x1+e13    ;
     am        -1000   ;
     rs. w1     f5.+1000;
     am        -1000   ;

     rl. w1     f4.+1000;    w1:= psjob buf;
     al  w1  x1+e13    ;    psjob buf:= next psjob buf;
     am        -1000   ;
     rs. w1     f4.+1000;
     am        -1000   ;

     rl. w1     f2.+1000;    sender table addr:= next sender table addr;
     rs  w2  x1+2      ;    sendertable(psjobno).sem:=psjobque;
     al  w1  x1+10     ;
     am        -1000   ;
     rs. w1     f2.+1000;
     am        -1000   ;
     rl. w2     f9.+1000;   perm core:=next perm core
     al  w2  x2+r99    ;
     am        -1000   ;
     rs. w2     f9.+1000;
     am        -1000   ;

     rl. w2     f3.+1000;    w2:= next psjob no;
     al  w2  x2+1      ;
     sh  w2     i45+1  ;    if w2 <= i45+1 then
     jl.        a3.    ;    goto next corutine;

     jl. w3    (b3.)   ;    end init;
e.                     ;
\f


; pm 3.2.72                    boss 2, tpsjobstart, ...20...

;2. code page
g6:

b. b80  w.

b61:      0            ;    page 0 base
b14:      0            ;     -   1
          0            ;     -   2
b2:       0            ;     -   3
b11:      0            ;     -   4
     12<12 + 0         ;    page ident:  code page 2
b1:  j56: 7            ;    get page

     j144:-2           ;
b8:  j40: -1           ;    boss private interval
b3:       i31          ;    time for mount
b16: j57: 8            ;    page jump
b19:      10           ;    constant
b26: j17: 2            ;    send and wait fast
b27: j18: 1            ;    send and wait
b28: j58: 25           ;    call
b29: j59: 26           ;    curr corutine descr
b30: j60: 6            ;    open op
b31: j61: 5            ;    lock op
b33: j62: 67           ;    banker que
b34:      1<12         ;    constant
b35: j63: 4            ;    open
b36: j64: 3            ;    lock
b39: j26: 288          ;    slice length on disc
     j29: 415          ;
b40: j30: 413          ;    prepare bs adjust
     j32: 415          ;
b42: j33: 414          ;    terminate bs adjust
b71:j184: 32           ;    prepare access
b72:j185: 33           ;    terminate access
b41:      <:primout:>,0; name of online-job primary output area
b47: j27: 52           ;    request line free
b48: j28: 51           ;    request que
b57:      3<12         ;    constant
b59: j34: 0            ;    512 * c(b39)
b60:      2<12         ;    constant
b74:      4<12         ;    constant
b75:      1<2          ;    constant
b76:      1<(:e25-e26:)-1;  mask
b77:      -1-1<22      ;    remove reader
b79:      5<12         ;    constant
b80:      i16          ;    gross run for conversational jobs
b4:       1<23         ;    infinite time
    j178: 162          ;-2  virt,
b6: j179: 214          ;    rel  pack date and time
\f


; re  14.8.74             boss 2, tpsjobstart    ...21...

; calls from codepage 5

b. a5 w.

c137=k-b61
     jl. w1     c25.   ;    call set claims
     al  w3     c147   ;
     jl.        a5.    ;

c144=k-b61
     jl. w2     c143.  ;    call catproc (create entry)
                1<12   ;+2    :  parameter
     am        -2      ;+4    :  alarm return
     al  w3     c148   ;+6    :  normal return
     jl.        a5.    ;

c145=k-b61
     jl. w2     c143.  ;    call catproc (increase entry)
            4 + 1<12   ;+2    :  parameter
     am        -2      ;+4    :  alarm return
     al  w3     c149   ;+6    :  normal return
     jl.        a5.    ;

c146=k-b61
     jl. w2     c143.  ;    call catproc (remove entry)
                5      ;+2    :  parameter
     am        -2      ;+4    :  alarm return
     al  w3     c150   ;+6    :  normal return
a5:  rl. w2     j198.  ;
     rs. w0    (b14.)  ;    save error param at start of page 1;
     jl.       (b16.)  ;    page jump to return

j198:           471    ;    virt of codepage 5

e.

\f


; re  14.8.74                boss 2, tpsjobstart  ...22...



b. a13  w.             ;
; cat proc:
; call:   w0:= 2 * page no < 12 + rel addr of name
;         w1:= abs addr of interval
;         w3:= page 1 base = psjob descr base
;         jl. w2     c26.   
; w2:     <code> + <length in slices> < 12
;    +2   alternative return; w0 = 0 if killed, = 1 if claims exceeded
;    +4   normal return
;
; <code>
; 0,1,2,3 ; create entry and permanent with <code>
;     4   ; increase entry
;     5   ; remove entry
;     6   ;    -     -   with exact interval
;     8   ; create temp entry and reserve accounts and converts


a12: 2<12+d11+8        ;    page 1, rel of name
c143:rl. w0     a12.   ; entry from load command:
     al  w1  x3+d24    ;    w0,w1 := params as specified;

c26: rs  w0  x3+d1     ;    name addr:= x0;
     dl  w1  x1        ;    interval:= store w1;
     ds  w1  x3+d1+4   ;  
     rl  w1  x2        ;    w1:= funcno;
     ws. w2     b61.   ;    w2:= return rel to b61
     ds  w2  x3+d1+8   ;    code:= w1; return:= w2;

     sn  w1     5      ;    if remove entry then
     jl.        a0.    ;    goto prep bs;

     bl  w1  x3+d1+6   ;    w2:= length in slices;
     al  w2  x1        ;
     wm. w1     b39.   ;    w1:= length in segments;
     bl  w0  x3+d1+7   ;    w0:= code;
     sn  w0     4      ;    if increase entry then
     wa  w1  x3+d15    ;    w1:= tailsize + disc slice;
     se  w0     4      ;    else
     wa. w2     b34.   ;    w2:=1<12+length
     rs  w1  x3+d15    ;    tailsize:=w1
     sz  w0     3      ;    if not (create temp  ! increase) then
     jl.        a0.    ;    goto prep bs;
     al  w1     0      ;    disc claim:= w2;
     sn  w0     8      ;    all:= if reserve acc and conv then
     rl. w1     a13.   ;      6 else 0;
     ds  w2  x3+d14+6  ;    stations:= 0;
     al  w1     1      ;
     hs  w1  x3+d14+2  ;    opcode:= reserve;
     al  w1  x3+d14    ;    w1:= opaddr;
     rl. w2     b33.   ;    w2:= banker que;
     jl. w3    (b30.)  ;    open(banker que, reserve);

     rl  w2  x3+d82    ;    w2:= psjob buf;
     jl. w3    (b36.)  ;    lock(psjob buf);
     bl  w0  x3+d14+2  ; 
     sn  w0     0      ;    if opcode = 0 then
     jl.        a3.    ;    goto alternative return; comment killed;
\f


; pm 3.2.72                    boss 2, tpsjobstart, ...23...


; catproc
a0:  dl. w3     b40.   ; prep bs:
     jl. w1    (b28.)  ;    call prepare bs adjust;
     rl. w3     b14.   ;

a9:  dl  w1  x3+d1+4   ; set base:   w01:= interval;
     al  w3  x3+d105   ;    w3:= nul addr;
     jd         1<11+72;    set catalog base;
     se  w0     0      ;    if result <> 0 then
c.-1, o15, z.          ;    (bossfault xref)
     jd        -15     ;    boss alarm;

     al  w1  x3-d105+d15;    w1:= tail addr;
     bl  w3  x1-d15+d1 ;    w3:= page base of name;
     rl. w3  x3+b61.   ;   
     ba  w3  x1-d15+d1+1;   w3:= name addr(abs);
     bl  w2  x1-d15+d1+7;   w2:= code;
a2:  bl. w0  x2+a4.    ; try again:   call func no(w2);
jd-1                                                  ;******testoutput
     hs. w0     3      ;
     jd   ; func no
     sn  w2     6      ;    if selective clear then
     jl.        a11.   ;    goto clear sel;
     se  w0     0      ;    if result <> 0 then
     jl.        a5.    ;    goto not done;
     sn  w2     8      ;     if reserve account then
     jl.        a1.    ;    goto create area process;

     sl  w2     4      ;    if clear or increase then
     jl.        a6.    ;    goto terminate bs;
     sh  w2     0      ;    if -, create temp then begin
     jl.        a1.    ;
     al  w1  x2        ;      w1:= code;
     jd         1<11+50;      permanent (name, code);
     se  w0     0      ;      if result <> 0 then
     jl.        a7.    ;      goto boss claim exceeded;
                       ;    end;

a1:  jd         1<11+52;    create area process;
     sn  w0     0      ;    if result = 0 then
     jd         1<11+8 ;    reserve process;
     se  w0     0      ;    if result <> 0 then
c.-1, o16, z.          ;    (bossfault xref)
     jd        -16     ;    boss alarm;
     rs  w0  x3+8      ;    clear nametableaddr
     al  w2  x3        ;    send and wait dummy mess
     al. w1     b60.   ;    to get name table addr;
     jl. w3    (b27.)  ;
a6:  dl. w3     b42.   ;    terminate bs adjust;
     jl. w1    (b28.)  ;    if claim exceeded then
     jl.        a8.    ;+2  goto claim exceeded;
     al  w0     1      ;+4  result:= claims exceeded;
     rl  w1  x3+d1+8   ;
     jl.     x1+b61.+4 ;    return;
c.-1,o35,z.            ;    bossfault xref

a4: h.  1<11+40, r.4, 1<11+44, 1<11+48, 1<11+40  ,-35 ,1<11+40 w. ; func no
a13: 6<12              ;    const.
\f


; pm 3.2.72                    boss 2, tpsjobstart, ...24...
;catproc


a3:  rl  w1  x3+d1+8   ; alternative return:
     jl.     x1+b61.+2 ;    goto return - 2;

a5:  sn  w2     0      ; not done:   if code = 0 and res = 3 then
     se  w0     3      ;    begin
     jl.        a10.   ;
     jd         1<11+48;      clear entry;
     sn  w0     0      ;      if res = 0 then
     jl.        a2.    ;      goto try again;
                       ;    end;
a10: rl. w3     b11.   ;
     rl  w1  x3+d1+8   ; 
     al  w1  x1-2      ;    return:= return - 2;
     rs  w1  x3+d1+8   ;
     sn  w2     4      ;    if result <> (if code = increase entry
     am         2      ;    then 6 else 4)
     sn  w0     4      ; 
     sn  w2     5      ;    ! code = remove entry then
c.-1, o17, z.          ;    (bossfault xref)
     jd        -17     ;    boss alarm;
     jl.        a6.    ;    goto terminate bs;

a11: al  w2     5      ; clear sel:   code:= clear;
     se  w0     0      ;    if result = 0 or result = 3 then
     sn  w0     3      ;
     jl.        a2.    ;    goto try again;
c.-1, o18, z.          ;    (bossfault xref)
     jd        -18     ;    boss alarm;

a7:  se  w0     6      ;    boss claim exceeded:
c.-1, o19, z.          ;    (bossfault xref)
     jd        -19     ;    if result <> 6 then boss alarm;
     rl. w3     b14.   ;    w3:= page 1 base;
a8:  rl  w1  x3+d1+8   ;    return:= return - 2;
     al  w1  x1-2      ;
     al  w0     5      ;    code:= remove;
     ds  w1  x3+d1+8   ;  
     jl.        a9.    ;    goto set base;

e.                     ;
\f


; pm 3.2.72                    boss 2, tpsjobstart, ...25...

b. a17  w.             ;

; set claims:

c27=k-b61
     dl  w1  x3+2      ;    pagejump entry to set claims
     ds  w1  x3+d64    ;
     jl. w1     c25.   ;
     dl  w3  x3+d64    ;
     jl. w1    (b16.)  ;

c25: ws. w1     b61.   ;
     rs  w1  x3+d6     ;    d6:= return - c25;
     jd         1<11+36;    get clock
     ld  w1     5      ;    w0:=short clock
     al  w1     0      ;    clear w1
     ds  w1  x3+d15+12 ;    name table addr, file count:= date, time;

     bl  w1  x3+d88    ;    if reader reserved
jd-1                                                     ;******testoutput
     so  w1     1      ;    then begin
     jl.        a8.    ;
     al  w1  x1-1      ;
     hs  w1  x3+d88    ;
     rl. w0     b74.   ;    op.code:= release reader;
     rs  w0  x3+d87+2  ;
     bz  w0  x3+d131   ;    op.device no :=
     rs  w0  x3+d87+6  ;    reader device number
     al  w1  x3+d87    ;
     rl. w2     b33.   ;
     jl. w3    (b30.)  ;      open op(banker que, release reader);
     rl  w2  x3+d82    ;
     jl. w3    (b36.)  ;      lock(psjob buf);
                       ;    end;
a8:  al  w0     8      ;   
     hs  w0  x3+d14+2  ;    opkind:= set claims;

     rl  w1  x3+d47    ;    w1:= opsize:= size;
     rs  w1  x3+d14+22 ;
     al  w0     0      ;    w1:= size //(512 * disc slice);
     wd. w1     b59.   ;    w0:= size mod(512 * disc slice);
     se  w0     0      ;
     al  w1  x1+1      ;    w1:= upround(size/(512 * disc slice));
     bl  w0  x3+d88    ;
     sz  w0     1<9    ;    if convert then
     bz  w1  x3+d95    ;    w1:= temp area length;
     hs  w1  x3+d95    ;    dump area length:= w1;
     bz  w2  x3+d58+1  ;    w2:=dumparea+temp disc
     wa  w2  2         ;
c.-i27,rl w1 x3+d58 z. ;
c.i27, rl w1 x3+d59 z. ;    w1:= temp drum claim + 1 entry;
     wa. w1     b34.   ;
     rs  w1  x3+d74    ;    convert claim:=w1,w2
     hs  w2  x3+d74+1  ;
     bl  w0  x3+d88    ;    if -,jobstate online then
     sz  w0     1<3    ;
     jl.        a5.    ;    begin
     bz  w0  x3+d45    ;
     wa  w2     0      ;      w2:=w2+outputarea
     wa. w1     b34.   ;      w1:= w1 + 1 entry;

a5:                    ;    end;
\f


; re  14.8.74                  boss 2, tpsjobstart    ...25a...

     bl  w0  x3+d88    ;    if tape job
     so  w0     1<8    ;      or card job then
     jl.        a2.    ;      begin
     rl  w0  x3+d83    ;
     al  w3     0      ;      w2 := w2 + job file size (in slices);
     wd. w0     b39.   ;
     wa  w2     0      ;
     wa. w1     b34.   ;      w1 := w1 + 1 entry;
     rl. w3     b14.   ;
a2:                    ;      end;
     sz  w2    -1<11   ;    if w2>2047 then
     jl.        c115.  ;    goto no claiming
     hl  w0  x3+d49    ;    + stations;
     ds  w1  x3+d14+6  ;    stations:= w0; op temp entries:= w1;
     hs  w2  x3+d14+7  ;    op temp disc slices:= w2;
     hs  w2  x3+d85+1  ;    save disc slices;
c.-i27,rs w1 x3+d58 z. ;
c.i27, rs w1 x3+d59 z. ;    temp drum:= w1;
     hs  w2  x3+d58+1  ;    temp disc slices:= w2;
     rl. w0     a6.    ;    opreader:= 1<12
c.e53-1
     rl  w1  x3+d119   ;    if rbreaders exist and host id <> 0
     se  w1     0      ;    then
     ba. w0     1      ;    claim rbreader
z.
     rl  w1  x3+d68    ;    opconverts:= converts+(if online then 0 else 1);
     rs  w1  x3+d111   ;    rest converts,accounts:= converts,accounts;
\f


; pm 20.4.72                    boss 2, tpsjobstart, ...26...
; set claims
b. a9  w.              ;

     bl  w2  x3+d88    ;
     so  w2     1<3    ;
     wa. w1     b34.   ;
     ba  w1     2      ;
     al  w1  x1+1      ;
     bl  w2  x3+d30    ;
     sz  w2     1<9    ;    op.accounts:=accounts+1+op.converts
     al  w1  x1+1      ;    + if job printer then 1 else 0;
     bl  w2  x3+d14+3  ;    if account job then
     sn  w2     2      ; 
     am        -2      ;    op.all:= 5
     al  w2     7      ;    else op.all:= 7;
     hs  w2  x3+d14+4  ;
     ds  w1  x3+d14+10 ;    store op.reader, op.accounts, op.converts;


     dl  w2  x3+d39    ;    opbufs:= bufs+1; opareas:= areas + 1;
     wa. w1     b34.   ;
     al  w1  x1+1      ;
     hl  w2  x3+d71    ;    opsuspends:= suspends;
     wa. w2     b34.   ;    op internals:= internals + 1;
     ds  w2  x3+d14+14 ;

     bz  w1  x3+d59+1  ;    optemp drum:= temp drum slices;
     rs  w1  x3+d14+16 ;
     hs  w1  x3+d85    ;    save drum slices;
     bl  w1  x3+d71    ;    rest suspends:= suspends;
     hs  w1  x3+d99    ;
     bl  w1  x3+d43    ;
     se  w1     0      ;    w1:= mounts
     jl.        a0.    ;    if mounts = 0 then begin
     dl  w1  x3+d30+2  ;      mounts:= stations + spec. stations;
     ld  w1     e17-e26-23;
     la. w0     b76.   ;
     al  w1     0      ;
a1:  sz  w0     1      ;
     al  w1  x1+1      ;
     ls  w0    -1      ;
     se  w0     0      ;
     jl.        a1.    ;

     ba  w1  x3+d49    ;    end;
a0:                    ;    opgross time:= time + mounts + mount time;
     hs  w1  x3+d43    ;
     hs  w1  x3+d98    ;    rest mounts:= mounts;
     wm. w1     b3.    ;    opnet time:= time;
     rl  w2  x3+d53    ;
     rs  w2  x3+d2     ;    net time:= time;
     wa  w1     4      ;
     ds  w2  x3+d14+28 ;
e.                     ;
\f

                                           
; pm 27.12.72                    boss 2, tpsjobstart, ...26a...
; set claims

b. a9  w.
     dl  w1  x3+d30+2  ;     opdevice:=device;
     la. w0     b77.   ;    remove reader;
     ds  w1  x3+d30+2  ;
     ds  w1  x3+d14+20 ;
     ld  w1  e17+1-e28-e19;
     ld  w1 -48+e19    ;     w1:=simulated proc devices required;
     bl  w0  x3+d75    ;     w0:=conversational job;
     sn  w1     0      ;     if w1 or w0 <>0 then
     se  w0     0      ;     begin
     jl.        4      ;
     jl.        a1.    ;
     rl. w0     b80.   ;
     wa  w0  x3+d14+26 ;
     rs  w0  x3+d14+26 ;       op gross run:=option (great) + op gross run;
     am         -1     ;       abs core place:=true;
a1:  al  w0     0      ;     end else abs core place := false;
     rs  w0  x3+d14-6  ;

     bz  w0  x3+d41    ;     opkeys:=keys;
     bz  w1  x3+d88    ;    if not alarm claims 
     sh  w0     0      ;    and no keys wanted then
     sz  w1     1<9+1<4;
     jl.        4      ;
     jl.        c124.  ;      goto limited key;
     sh  w0     7      ;    if all keys wanted then
     ls  w0     12     ;      keys:=0;
     hl  w0  x3+d132   ;
     rs  w0  x3+d14+24 ;     oppriority:=priority;
     rl  w1  x3+d14+28 ;     w1:= net run;

     bz  w2  x3+d88    ;    w2:=jobstatus
     sl  w1  i161      ;    longjob2:=nettime>i161
     lo. w2     b75.   ;
     hs  w2  x3+d88    ;
     al  w0     i5     ;
     rs  w0  x3+d115+2 ;    n r l at provoke before finis:= i5;
     al  w0    -1      ;
     rs  w0  x3+d115+0 ;    n r l at finis:=
     rs  w0  x3+d115+4 ;    n r l at dump:=
     rs  w0  x3+d115+6 ;    n r l at provoke before dump:=
     rs  w0  x3+d115+8 ;    n r l at high priority exceeded:=
     rs  w0  x3+d115+10;    n r l at corelock exceeded:= -1;
     ld  w1    -100    ;    summa waiting time:=
     ds  w1  x3+d137   ;    actual waiting time:=0;

     dl  w1     110    ;    arrival:= clock * 2**-13;
     ld  w1    -13     ;    oparrival:= arrival mod 2**24;
     ds  w1  x3+d17+2  ;
     rl  w2  x3+d66    ;    opmax wait:= max wait;
     ds  w2  x3+d14+32 ;

     al  w1  x3+d14    ;    w1:= op;
     rl. w2     b33.   ;    w2:= banker que;
     jl. w3    (b30.)  ;    open op;
e.
\f


; pm 27.12.72                    boss 2, tpsjobstart, ...27...
;set claims

     rl  w2  x3+d82    ;
     jl. w3    (b36.)  ;    lock(psjob buf);

     bl  w2  x3+d14+2  ;   if result <> 0 then goto not claimed;
     se  w2     0      ;
     jl.        c104.  ;
     bl  w0  x3+d14+3  ;     if accountjob then begin
     se  w0     2      ;
     jl.        a12.   ;
     al  w0     20     ;      op.code=activate
     hs  w0  x3+d14+2  ;
     rl. w2     b33.   ;

     al  w1  x3+d14    ;
     jl. w3    (b30.)  ;      open(bankerque,wait activate)
     rl  w2  x3+d82    ;
     jl. w3    (b36.)  ;      lock(psjobbuf)
     dl  w2     110    ;      w2:=time
     ld  w2    -11     ;
     jl.        a13.   ;    end else begin
; expected finis time:
a12: rl  w2  x3+d14+4  ;    w2:= finis time mod 2**24 - arrival mod 2**24
     ws  w2  x3+d17+2  ;    := finis time - arrival;
     al  w1     0      ;  
     aa  w2  x3+d17+2  ;    w12:= finis time(sec * 10**4 * 2**-13)
     ld  w2     2      ;                     (sec * 10**4 * 2**-11)
a13: wd. w2     a0.    ;end w1:= finis time mod 24 h (sec * 10**4 * 2**-11);
     al  w0     0      ;
     hs  w0  x3+d92    ;    tapecount:=0
     rs  w0  x3+d79    ;    cputime used:=0
     rs  w0  x3+d106   ;    proc descr addr := 0;
     ld  w1     7      ;    w01:=     -     -       -(sec * 10**4 * 2**-4);
     wd. w1     a1.    ;    w1:= finis time in sec after midnight;
     rs  w1  x3+d84    ;    finis time:= w1;

     bl  w0  x3+d14+24 ;    protection reg:= opkeys;
     hs  w0  x3+d66    ;
     rl  w1  x3+d14+22 ;    first storage addr:= opsize;
     rs  w1  x3+d47-2  ;  
     wa  w1  x3+d47    ;    top storage addr:= opsize + size;
     rs  w1  x3+d47    ;
\f


; re  14.8.74                boss 2, tpsjobstart      ...27a...


;create primary output area and process
     al  w0     0      ;area name:=0
     rs  w0  x3+d112   ;
     bl  w2  x3+d88    ;
     sz  w2     1<6+1<3;    if not (online or internal) then
     jl.        4      ;
     jl.        a17.   ;      goto reserve output;
     rx  w0  x3+d114   ;    page3 := virt op addr from commandio;
     rl. w1    (b29.)  ;    virt op addr := 0; (i.e. answer send := true)
     rs  w0  x1+12     ;
     jl. w3    (b1.)   ;    get pages;
     rl. w1     b2.    ;
     rl  w2  x1+4      ;    w2 := answer semafor;
     jl. w3    (b35.)  ;    send answer;
     bl  w2  x3+d88    ;
     so  w2     1<3    ;    if jobstateonline then
     jl.        a17.   ;    begin

     al  w0     b41-b61;      rel addr of <:primout:>;
     al  w1  x3+d24    ;      std interval;
     jl. w2     c26.   ;      remove entry with exact interval;
     6                 ;
c.-1, o30, z.          ;    (bossfault xref)
     jd        -30     ;
     dl. w1     b41.+2 ;      primary output name := <:primout:>;
     ds  w1  x3+d112+2 ;
     dl. w1     b41.+6 ;
     ds  w1  x3+d112+6 ;
     rl. w0     a4.    ;      w0:= rel name addr;
     al  w1  x3+d24    ;      w1:= abs addr of private interval;
\f


; pm 20.4.72                    boss 2, tpsjobstart, ...28...
; set claims
     bl  w2  x3+d45    ;      set length to output;
     hs  w2  x3+d90    ;      output length:= output;
     hs. w2     4      ;

     jl. w2     c26.   ;      create login area;
     2 ; + length < 12 ;
     jl.        c139.  ;      if error then goto login claims exceeded;
     al  w0     1      ; reserve accounts:
     hs  w0  x3+d14+2  ;    op.code:= reserve;
     al  w0     2      ;    op.all:= accounts;
     hs  w0  x3+d14+4  ;
     al  w0     0      ;
     hs  w0  x3+d14+5  ;    op.stat:= op.temp:= 0;
     rs  w0  x3+d14+6  ;
     al  w1  x3+d14    ;
     rl. w2     b33.   ;
     jl. w3    (b30.)  ;    open(banker que, reserve);
     rl  w2  x3+d82    ;
     jl. w3    (b36.)  ;    lock(psjob buf);
     bl  w0  x3+d14+2  ;    if killed then begin
     se  w0     0      ;
     jl.        a3.    ;
     am         6-15   ; cause 6 : killed
c139:al  w0     15+100 ; cause 15: login claim exceeded
     hs  w0  x3+d104   ;
     al  w1     0      ;
     sn  w0     15+100 ;      if login claims exceeded then
     rs  w1  x3+d112   ;        clear primout name; end;
     jl.        a3.    ;    end else begin
a17: al  w0     1      ; reserve output:
     hs  w0  x3+d90    ;    output length:= 1;
     rl. w0     a4.    ;
     al. w1     b8.    ;
     jl. w2     c26.   ;    reserve temp area, accounts and converts
     1<12+8            ;    and create temp area for primout;
     jl.        c113.  ;    end;
a3:  rl. w1    (b29.)  ;    page 1 descr:= job file;
     rl  w0  x3+d0     ;
     rs  w0  x1+8      ;
     jl. w3    (b1.)   ;    get pages;

; initialize job file descr for run:
     rl. w2     b11.   ;    w2:= job descr base;
     bz  w1  x2+d45    ;    super buffer length:= output * slice length;
     wm. w1     b39.   ;
     ls  w1     9      ;
     al  w0  x1-512    ;
j45=k+1
     rs  w0  x3+196    ;
\f


; pm 29.4.72                    boss 2, tpsjobstart, ...29...
; set claims

     al  w0    -512    ;    buf byte:=-512;
j46=k+1
     rs  w0  x3+302    ;
     al  w0     0      ;
j47=k+1
     rs  w0  x3+299    ;    state:= 0;
j50=k+1
     rs  w0  x3+301    ;    next byte:= 0;
j25=k+1
     rs  w0  x3+194    ;    bufbyte ps:=0
j141=k+1
     rs  w0  x3+180    ;    exhaust count:=0
j117=k+1
     hs  w0  x3+447    ;    start rel reader:=0
j158=k+1
     hs  w0  x3+474    ;
     al  w0     512    ;
j53=k+1
     rs  w0  x3+191    ;     restroom on primary output:=
j133=k+1
     rs  w0  x3+181    ;    restroom on jobcontr. printer:=512
     rl. w0     a16.   ;    virt get jobcontr. printer buf
j163=k+1
     rs  w0  x3+183    ;    :=start virt. jobcontr. printer buf
     al  w0     i3     ;    appetite:= i3;
j48=k+1
     rs  w0  x3+304    ;
     dl  w1  x2+d47    ;    first and top storage on jobfil descr:=
j138=k+1
     ds  w1  x3+186    ;    first and top storage on jobdescr
j49=k+1
     al  w3  x3+195    ;    super buffer name:= primary output name;
     rl  w1  x2+d112   ;
     rs  w1  x3        ;
     dl  w1  x2+d112+4 ;
     ds  w1  x3+4      ;
     dl  w1  x2+d112+8 ;
     ds  w1  x3+8      ;
     rl. w3     b14.   ;
     al  w0    -6      ;
j69=k+1
     hs  w0  x3+198    ;    job card state:= -6;
j70=k+1
     hs  w0  x3+446    ;    job reader state:= -6;
     bz  w1  x2+d30    ;    job type:= off line < 3 + job reader < 2 + 
     ls  w1    -8      ;    job printer < 1 + job card;
     bl  w0  x2+d51    ;    if control
     se  w0     0      ;    then
     al  w1  x1+1<2    ;    set job controlled reader bit
     bl  w0  x2+d88    ;    job printer used:= 1<4:= false;
     so  w0     1<3    ;    job printer accounted:=false; (1<6)
     al  w1  x1+1<3    ;
     bl  w0  x2+d75    ;
     sn  w0     0      ;
     al  w1  x1+1<5    ;    jobtype:=jobtype+no conversation<5
     am         1      ;    store job state
j114=k+1
     hs  w1  x3+179    ;
     rl. w3     b11.   ;
     al  w0     c16    ;
     rs  w0  x3+d13    ;    command state:= claims set;
     bl  w1  x3+d104   ;
     al  w0  x1-100    ;    if alarmcause > 99 then
     sl  w1     100    ;      goto create alarm job (w0 = alarmcause);
     jl.        c140.  ;       nb: online job;
\f


; pm 20.4.72                    boss 2, tpsjobstart, ...30...
;set claims

; reservation of jobtape area:
     bl  w0  x3+d88    ;    if reader was reserved then
     sz  w0     1<8    ;
     sz  w0     1<5    ;
     jl.        a9.    ;    begin
     al  w0     3      ;      reserve reader;
     hs  w0  x3+d14+2  ;
     rl  w0  x3+d119   ;    set host ident,
     bz  w1  x3+d131   ;    reader device no
     ds  w1  x3+d14+6  ;    in operation
     al  w1  x3+d14    ;
     rl. w2     b33.   ;
     jl. w3    (b30.)  ;      open op(banker que, reserve reader);
     rl. w3     b11.   ;
     rl  w2  x3+d82    ;
     jl. w3    (b36.)  ;      lock(psjob buf);
     rl. w3     b11.   ;
     bl  w0  x3+d14+2  ;
     sn  w0     0      ;      if killed then
     jl.        c101.  ;      goto killed during reserve job file;
     bl  w1  x3+d88    ;
     al  w0  x1+1      ;
     hs  w0  x3+d88    ;

a9:  so  w0     1<8    ;    end;
     jl.        a11.   ;    if  card job or tape job then begin
a10: al  w0     1      ;      op.code:= reserve;
     hs  w0  x3+d14+2  ;
     al  w0     0      ;      op.all:= 0; op.stations:= 0; 
     rl  w1  x3+d83    ;      op.entries:= 1; op.slices:= job tape area length;
     wd. w1     b39.   ;
     bz  w2  x3+d58+1  ;
     ws  w2     2      ;
     hs  w2  x3+d58+1  ;    temp disc slices:= temp disc slices -
c.-i27
     bl  w2  x3+d58    ;
     al  w2  x2-1      ;
     hs  w2  x3+d58    ;
z. c.i27
     bl  w2  x3+d59    ;    job tape area length;
     al  w2  x2-1      ;
     hs  w2  x3+d59    ;    temp entries:= temp entries - 1;
z.
     wa. w1     b34.   ;
     ds  w1  x3+d14+6  ;
     al  w1  x3+d14    ;
     rl. w2     b33.   ;
     jl. w3    (b30.)  ;      open(banker que, reserve area);
     rl. w3     b11.   ;

     rl  w2  x3+d82    ;
     jl. w3    (b36.)  ;      lock(psjob buf);
     rl. w3     b11.   ;
     bl  w0  x3+d14+2  ;
     sn  w0     0      ;      if op.code = 0 then
     jl.        c101.  ;      goto killed;
     bl  w0  x3+d88    ;
     sz  w0     1<5    ;
     am         18     ;
\f


; pm 20.4.72                    boss 2, tpsjobstart, ...30a...

     al  w0     5      ;      op.code:= release if card job then job card area else job tape area;
     hs  w0  x3+d14+2  ;
     al  w1  x3+d14    ;
     rl. w2     b33.   ;
     jl. w3    (b30.)  ;      open(banker que, release job tape area);
     rl. w3     b11.   ;
     rl  w2  x3+d82    ;
     jl. w3    (b36.)  ;      lock(psjob buf);
     rl. w3     b11.   ;
     bl  w2  x3+d58+1  ;
     bs  w2  x3+d45    ;    if temp disc < swoparea + output - 1 then
     bs  w2  x3+d95    ;      goto temp exceeded job file;
c. -i27
     bl  w1  x3+d58    ;
z. c. i27
     bl  w1  x3+d59    ;
z.
     sl  w1     1      ;
     sh  w2    -2      ;
     jl.        c138.  ;
\f



; pm 4.5.72                    boss 2, tjobstart, ...31...

; set claims
a11: al  w2  x3        ;    end;
     rl. w3     b14.   ;
 b. a12  w.

; output expected finis time:
     bl  w0  x2+d88    ;
     sz  w0     1<4+1<9;    if  job state error or convert then return
     jl.        a3.    ;
     so  w0     1<3    ;      if job state online then
     jl.        a1.    ;      begin
j38=k+1
     rl  w1  x3+193    ;        page 3 descr:= virt output buffer;
     rl. w3    (b29.)  ;
     rs  w1  x3+12     ;
     jl. w3    (b1.)   ;        get page;
     rl. w3     b11.   ;        w3:= job descr base;
     rl. w2     b2.    ;        w2:= text base;
     jl.        a2.    ;      end else begin

a1:  so  w0     1<2    ;        if gross time < i161 then
     jl.        a3.    ;        goto no time output;

     rl. w2    (b29.)  ;        page 1 descr:= job descr;
     rl      x2+14     ;
     rs      x2+8      ;
     rl. w2     b47.   ;        lock(request line free);
     jl. w3    (b31.)  ;
     al  w2  x1+6      ;        w2:= text base;
a2:                    ;      end;
     
     dl. w1     a4.    ;
     ds  w1  x2+2      ;      text(0,3):= <:finis       :>;
     dl. w1     a5.    ;
     ds  w1  x2+6      ;
     dl  w1  x3+d19+2  ;      text(4,7):= job name;
     ds  w1  x2+10     ;
     dl  w1  x3+d19+6  ;
     ds  w1  x2+14     ;      
     rl. w1     a6.    ;      text(8):=<: at:>
     rs  w1  x2+16     ;

     rl  w1  x3+d84    ;      w1:=expected finistime
     al  w1  x1+30     ;
     rs  w2  x3+d84    ;      d84:=text base
     al  w2  x2+6      ;      for n:=3 step -1 until 1 do
a7:  al  w0     0      ;      begin
     wd. w1     b19.   ;        text(8+n):= w1 mod 10
     rs  w0  x2+16     ;        w1:= w1 // 10
     al  w0  0         ;
     wd. w1     a8.    ;        text(8+n):=
     ls  w0     8      ;        (w1 mod 6) shift 8
     wa  w0  x2+16     ;        +text(8+n)
     wa. w0     a9.    ;        +<: 00:>
     rs  w0  x2+16     ;
     al  w2  x2-2      ;
     se  w2 (x3+d84)   ;
     jl.        a7.    ;      end
     al  w0     10     ;    text(12):=<:<10>:>
     rs  w0  x2+22     ;
\f


; pm 3.2.72                    boss 2, tpsjobstart, ...32...


; set claims
                       ;      w2 = text base;
     bz  w0  x3+d88    ;
     so  w0     1<3    ;      if jobstate online then
     jl.        a10.   ;      begin

     rl. w1    (b29.)  ;        page 1 descr:= jobdescr
     rl  w0  x1+14     ;
     rs  w0  x1+8      ;
     al  w0     0      ;        page 3 descr:= 0
     rs  w0  x1+12     ;
     rl. w1     b14.   ;        w1:= jobfile base
     rs. w3     b14.   ;
     bl  w0  x3+d102   ;        if information not wanted then skip the line
     se  w0     0      ;
     jl.        a11.   ;

     al  w0     512-24 ;        restroom:=512-24
j51=k+1
     rs  w0  x1+191    ;
j52=k+1
     rl  w2  x1+197    ;        open(terminal full)
     rs  w2  x3+d84    ;
     jl. w3    (b35.)  ;
     rl  w1 (x3+d84)   ;        terminal full:=terminal full+11
     al  w1  x1+11     ;
     rs  w1 (x3+d84)   ;
     jl.        a11.   ;      end else begin

a10: al  w0     3      ;        opcode:=printline
     al  w1     22     ;        length:=22 (notice: skip the newline char)
     ds  w1  x2-2      ;
     al  w1  x2-6      ;        w1:=linebase
     rl. w2     b48.   ;        w2:=requestlineque
     jl. w3    (b30.)  ;        open op(requestlineque, print)
                       ;      end
a3:  rl. w1    (b29.)  ;      no timeoutput:
     rl  w0  x1+14     ;      page 1 descr := jobdescr
     rs  w0  x1+8      ;
     rl. w3     b11.   ;      w3:=page 1 base := jobdescr base
     rs. w3     b14.   ;
a11:                   ; return:
     rl  w1  x3+d6     ;
     jl.     x1+b61.   ;

a4=k+2, <:finis :>     ;
a5=k+2, <:      :>     ;
a6:     <: at:>        ;
a8:     6              ;
a9:     <: 00:>        ;
e.                     ;

a0:  3*15*15*625       ;    24*60 *60*10000*2**-11
a1:  625               ;    10000*2**-4
a4:  2<12+d112         ;
c.e55-1
a6:  1<12              ;    opreader
z.
c.-e55
a6:  0                 ;    opreader
z.
a16: j164:383          ;    start job controlled printer buf
e.                     ;
\f


; pm 3.2.72                    boss 2, tpsjobstart, ...33...


; alarms from code page 2.

b. a3  w.              ;
c113:al  w0     6      ; cause 6 :    killed
     hs  w0  x3+d104   ;
     al  w3     c110   ;    goto request alarm;
     jl.        a1.    ;
a0:  2<12+d100         ;
c101:                  ; killed during reserve jobfile:
     rl. w3     b14.   ;    w3:=page 1 (=job file page);
j192=k+1               ;
     al  w2  x3+218    ;
     al  w0  x2+8      ;
     rs. w0     b61.+6 ;
     jl. w3    (b72.)  ;    release access(jobfile);
     al  w0     0      ;
     rs. w0    (b61.+6);    name table address := 0;
     rl. w1    (b29.)  ;
     rl  w2  x1+14     ;    page 1:= page 4;
     rs  w2  x1+8      ;
     rl. w3     b11.   ;
     rs. w3     b14.   ;
     rl. w0     a0.    ;    remove job file;
     al  w1  x3+d101+2 ;
     jl. w2     c26.   ;
     6                 ;
c.-1, o31, z.          ;    (bossfault xref)
     jd        -31     ;
     bl  w0  x3+d88    ;    release if card job then job card area
     sz  w0     1<5    ;    else job tape area;
     am         18     ;
     al  w0     5      ;
     hs  w0  x3+d14+2  ;
     al  w1  x3+d14    ;
     rl. w2     b33.   ;
     jl. w3    (b30.)  ;
     rl  w2  x3+d82    ;
     jl. w3    (b36.)  ;
\f


; pm 27.9.72                    boss 2, tpsjobstart, ...34...
; alarms

     am        -29     ; cause 6 :    killed
c138:al  w0     35     ; cause 35:    temp exceeded job file
c140:hs  w0  x3+d104   ; cause w0:
     rl. w1    (b29.)  ;    page 1 := page 4 ( = job descr page);
     rl  w2  x1+14     ;
     rs  w2  x1+8      ;
     al  w3     c80    ;    goto create alarm job;
a1:  rl. w2     j90.   ;
     jl.       (b16.)  ;
c124:am         20-3   ;
c115:al  w2     3      ;
c104:ls  w2     3      ;
     dl. w1  x2+a2.    ;
     ds  w1  x3+d11+10 ;
     dl. w1  x2+a3.    ;
     ds  w1  x3+d11+14 ;
     al  w0     37     ; cause 37:    limited <option>
     hs  w0  x3+d104   ;
     al  w3     c37    ;    goto set alarm claims;
     jl.        a1.    ;
j90:      473          ;    alarm page
a2=k-6, a3=k-2         ;
     <:stations:>, 0   ; 1
     <:entries:>, 0    ; 2
     <:disc slices:>   ; 3
     <:readers:>, 0    ; 4
     <:readers:>, 0    ; 5
     <:converts:>, 0   ; 6
     <:accounts:>, 0   ; 7
     <:bufs:>, 0, 0    ; 8
     <:areas:>, 0, 0   ; 9
     <:internals:>, 0  ;10
     <:suspends:>, 0   ;11
     <:drum slices:>   ;12
     <:drum slices:>   ;13
     <:spec. device:>  ;14
     <:spec. device:>  ;15
     <:spec. device:>  ;16
     <:spec. device:>  ;17
     <:size:>, 0, 0    ;18
     <:size:>, 0, 0    ;19
     <:keys:>, 0, 0    ;20
e.
i. e. ;end b names  codepage 2
g5=k-g6
\f


; pm 3.2.72                    boss 2, tpsjobstart, ...35...
g8:  ; codepage 3

; constants
b. b80, g5  w.    ;

b61:      0            ;    page 0 base
b14:      0            ;    page 1 base
          0            ;    page 2 base
b2:       0            ;    page 3 base
b11:      0            ;    page 4 base
     13<12 + 0         ;    page ident:  code page 3
b1:  j15: 7            ;    get page
     j143:-4           ;
b5:  j39: -3           ;    boss std interval
b6:  j42: 400          ;    virt of codepage 3
     j165:-2           ;    boss privat interval
b8:  j166:-1           ;

b16: j16: 8            ;    page jump
b19:      10           ;    constant
b20:      -1<16        ;    -1<16   mask
b22: j167:34           ;    w0call
b28: j19: 25           ;    call
b29: j2:  26           ;    current corutine descr
b30: j20: 6            ;    open op
b31: j21: 5            ;    lock op
b32: j31: 72           ;    card reader free operation sem
b33: j22: 67           ;    bankque
b34:      1<12         ;
b35: j23: 4            ;    open
b36: j24: 3            ;    lock
b39: j94: 288          ;    slicelength on disc
b66=-b61.              ;    virtual codepage 5
     j54: 471          ;
b63:      <:disc:>,0,0 ;
     j109:288          ;    disc slice length
b65:      <:drum:>,0,0 ;
     j110:287          ;    drum slice length
b70: j108: 33           ;    term access
b71: j95: 32           ;     prepare access
b72: j160:21           ;
     j106:162          ;-2  virt,
b73: j107:229          ;    rel  general print
\f


; pm 3.2.72                    boss 2, tpsjobstart, ...36...

; psjob idle
b. a25  w.             ;
; page 4 = psjob descr
a20: rl. w1    (b29.)  ;    page 1 := page 4;
     rl  w2  x1+14     ;
     rs  w2  x1+8      ;
     rl. w3     b11.   ;
     rs. w3     b14.   ;
; page 1 = psjob descr

; wait for next job:
j36=k-b61              ;    entry off-line job; ext(404).
     al  w0     9      ;
     hs  w0  x3+d14+2  ;    opkind:= psjob idle;
     rl. w2     b33.   ;    w2:= bankque sem;
     al  w1  x3+d14+4  ;    w1:= op;
     rl  w0  x3+d91    ;    answersem:=psjobque
     rl  w3  x3+d14+2  ;
     ds  w0  x1+4      ;
     jl. w3    (b30.)  ;    open(banker que, psjob idle);
     rl. w1    (b29.)  ;    w1:= corutine descr;
     rl  w2  x1+8      ;    page 4:= page 1;
     rs  w2  x1+14     ;
     jl.        a13.   ;

a17: am         4      ; trf:   w2:= 6;
a18: al  w2     2      ; tre:   w2:= 2;
     rl. w3     b11.   ;
     al  w0     0      ;    w0:= 0;
     hs  w0  x3+d92    ;    tapeno:=0
     dl  w1  x1+8      ;
     ds  w1  x3+d122   ;    set host description
     rs  w0  x3+d119   ;
     al  w0     1      ;
     rs  w0  x3+d121-2 ;    rb printer name:=1;
     al  w0     1<8    ;    w0:=1<8
     al  w1     i162   ;    w1:= max length of job tape area;
     jl.        a15.   ;    goto a15;
\f


; re  14.8.74                  boss 2, tpsjobstart   ...36a...

a19: rl. w2     b32.   ; card:
     jl. w3    (b31.)  ;    lock chained(card reader free sem);
     al  w2  x1        ;    w2:=operation;
                       ;    initialize on job file page:
     dl  w1  x2+24     ;       first virt job buffer
j97=k+1
     ds  w1  x3+370    ;       top    -    -    -
     dl  w1  x2+28     ;       free job sem
j98=k+1
     ds  w1  x3+368    ;       full  -   -
     rl. w3     b11.   ;    initialize on job descr page:
     dl  w1  x2+8      ;       parent rb device name table addr
     ds  w1  x3+d120   ;         -    -    -    creation number
     rl  w0  x2+10     ;       rb term ident
     rs  w0  x3+d122   ;
     dl  w1  x2+32     ;       rb printername
     ds  w1  x3+d121   ;
     dl  w1  x2+16     ;       first virt boss buffer
     ds  w1  x3+d118+8 ;       top    -    -     -
     dl  w1  x2+20     ;       free boss sem
     ds  w1  x3+d118+12;       full  -    -
     rl  w0  x2+12     ;       card queue sem
     rs  w0  x3+d118+4 ;

     al  w0     0      ;
     rs  w3  x3+d118   ;    cardfilecount:=great
     hs  w0  x3+d116   ;    cardfileno:=0
     al  w0     1<5+1<8;    w0:= 1<5+1<8;
     al  w1     i163   ;    w1:= max length of job card area;
     al  w2     i118   ;
a15: rs  w2  x3+d11+2  ;    mode:= standard mode;
     al  w2     0      ;    w2:= 0;
c.-i27,wa. w1   b34.   ;    if no drum then w1:=w1+ 1 entry;
z.   ds  w2  x3+d69    ;    temp disc rest:= w1; login disc rest:= 0;
     rl. w1     b34.   ;    temp entries:=1
c.-i27,al  w1   0      ;    if no drum then temp entries:=0;
z.   ds  w2  x3+d67    ;    login drum rest:= 0;
     rs  w2  x3+d22    ;    perm claims := not defined;
     rs  w2  x3+d60    ;    prepares for creation of load area by
     rs  w2  x3+d28    ;    means of prep and term bsadjust.
     rs  w2  x3+d11+8  ;    name:= 0;
     rs  w2  x3+d23    ;    user name:=0
     dl. w2     b8.    ;    std interval := job file interval
     ds  w2  x3+d24    ;    := boss priv interval;
     ds  w2  x3+d101+2 ;
     hs  w0  x3+d88    ;    job state:= w0;
     rl. w1    (b29.)  ;    page1 := jobdescr
     rl  w2  x1+14     ;
     rs  w2  x1+8      ;
     rs. w3     b14.   ;
     so  w0     1<5    ;    w3:= if tape job then c30+c29
     am         c30    ;    else c29;
     al  w3     c29    ;
     rl. w2     j54.   ;    w2:= virt of code page 5;
     am.       (b11.)  ;
     al  w0     d64    ;
     jl. w1    (b22.)  ;    w0call;
\f


; pm 3.2.72                    boss 2, tpsjobstart, ...37...


     rl  w0  x3+d15    ;
     rs  w0  x3+d83    ;    job file length:= segment;
     dl  w1  x3+d11+10 ;    job file name:= name;
     ds  w1  x3+d100+2 ;
     dl  w1  x3+d11+14 ;
     ds  w1  x3+d100+6 ;
     rl. w1    (b29.)  ;    page 1 descr:= job file descr
     rl  w0  x3+d0     ;
     rs  w0  x1+8      ;
     jl. w3    (b1.)   ;
     jl.        a14.   ;

; online job:
j37=k-b61              ;    entry online job; ext(405).
a13: rl  w0  x3+d0     ;    page 1:= job file;
     rl. w1    (b29.)  ;    w1:= corutine descr;
     rs  w0  x1+8      ;
     rs. w3     b11.   ;    page 4 base:= w3;
     rl  w0  x3+d69    ;
     rl  w1  x3+d67    ;
     ds  w1  x3+4      ;
     al  w2  x3+2      ;    get commandio jobvariables
a8:  dl  w1  x2+d117   ;
     ds  w1  x2+d18    ;
     al  w2  x2+4      ;
     sh  w2  x3+d65+4-d18;
     jl.        a8.    ;
     dl  w1  x3+4      ;
     rs  w0  x3+d69    ;
     rs  w1  x3+d67    ;
     al  w0     1<3    ;    jobstate online:= true;
     hs  w0  x3+d88    ;

; wait for a job file:
a0:  rl. w3     b11.   ;    w3:= psjob descr base;
     al  w0     c15    ;    commandstate:= start;
     rs  w0  x3+d13    ;
     al  w2     c54    ;    switch := <:start:>;
     rs  w2  x3+d12    ;
     rl  w2  x3+d91    ;    w2:= psjob que;
     jl. w3    (b31.)  ;    lock op;
                       ;    page 1=job file page, page 4=job descr page
     bl  w2  x1+3      ;    w2:= op kind;
     ba. w2  x2+a1.    ;    goto kindtable(op kind);
     jl.     x2+a1.    ;

; switch kind table:   opkind
a1=k-1,  h. a2.        ; 1  mag tape ready
            a7.        ; 2  kill
            a10.       ; 3  terminate
            a7.        ; 4  answer
            a7.        ; 5  time up
            a5.        ; 6  internal
            a6.        ; 7  run
            c23.       ; 8  go  
            a4.        ; 9  submit
            a16.       ;10  convert
            a7.        ;11  kit on
            a19.       ;12  card job
            a18.       ;13  tre job
            a17.       ;14  trf job
            a9.        ;15  replace operation
            a7.        ;16  harderror swopin
         w.
\f


; pm 25.4.72                   boss 2, tpsjobstart,   ...38...


; dummy answer in case of operation to the foregoing job:
a4:  am         b35-b30;    w3:= open;
a2:  rl. w3     b30.   ;    w3:= open op;
     rl  w2  x1+4      ;    w2:= answer sem;
     jl  w3  x3        ;    open or open op;
     jl.        a0.    ;    goto wait for a job file;

a10: rl. w3     b11.   ; kill:
     hs  w2  x3+d104   ;    finis cause:= <>0;

a7:  al  w0     0      ;    signal opbuffer free
     hs  w0  x1+2      ;
     jl.        a0.    ;

;prepare job file:  page 1 = job file page,  page 4 = job descr page
     0                 ;    saved return
c24: al  w0     0      ;    line got:= 0;
     rs. w2     c24.-2 ;    save return;
j10=k+1
     rs  w0  x3+190    ;    
j35=k+1
     rl  w0  x3+189    ;    page 3 descr:= job file buf;
     rl. w3    (b29.)  ;
     rs  w0  x3+12     ;
     rl  w1  x3+10     ;    if onlinejob then d114:=virt of commandio opbuf
     rl. w3     b11.   ;
     rs  w0  x3+d3     ;    d3:=virt of job file buf
     al  w0     c15    ;    command state:= start;
     rs  w0  x3+d13    ;
     bl  w0  x3+d88    ;
     sz  w0     1<3    ;
     rs  w1  x3+d114   ;
     al  w2  x3+2      ;    save commandio jobvariables
a3:  dl  w1  x2+d18    ;
     ds  w1  x2+d117   ;
     al  w2  x2+4      ;
     sh  w2  x3+d65+4-d18;
     jl.        a3.    ;

     rl. w2     b14.   ;
j168=k+1
     al  w0  x2+257    ;
     rl. w1     c24.-2 ;    w1:= return;
     dl. w3     a12.   ;    call init line;
     jl.       (b22.)  ;


j11:      206          ; init job file:
a11: j12: 235          ;

j13:      157          ; init line:
a12: j14: 161          ;
\f



; pm 24.5.72                    boss 2, tpsjobstart,   ...38a...


; convert from commandio:
; page 1 = job file page, page 4 = job descr page
a16: rl. w2     b11.   ;
     dl  w0  x1+8      ;    param2:= file name;
     ds  w0  x2+14     ;
     dl  w0  x1+12     ;
     ds  w0  x2+18     ;
     rl  w0  x1+14     ;
     hs  w0  x2+d4     ;
     dl  w0  x1+18     ;    move rb printer name;
     ds  w0  x2+d121   ;
     rl  w0  x1+24     ;
     rs  w0  x2+d123   ;    set device kind
     rl. w3     b14.   ;
     jl. w2     c24.   ;    prepare job file;
     jl.        c107.  ;    io alarm;

     rl. w1    (b29.)  ;    page 1:= page 4;
     rl  w0  x1+14     ;
     rs  w0  x1+8      ;
     rl. w3     b11.   ;
     rs. w3     b14.   ;
     dl  w1  x3+14     ;    progname:= file name;
     ds  w1  x3+d18+2  ;
     dl  w1  x3+18     ;
     ds  w1  x3+d18+6  ;

     al  w2  x3+d18    ;    prep access(prog);
     dl  w1  x3+d24    ;
     jl. w3    (b71.)  ;
     jl.        c82.   ;    file does not exist;
     
     dl  w1  x3+d24    ;
     al  w3  x3+d105   ;   
     jd         1<11+72;    set catalog base(std);

     al  w3  x3+d18-d105;
     al  w1  x3+d11-d18;
     jd         1<11+42;    lookup (prog);
     bz  w0  x1+16     ;    w0:=entry.content
     se  w0     0      ;    if content<>text then
     jl.        a21.   ;    goto terminate
     al  w0     1<9+1<7+1<3;  jobstate:=online and convert
     hs  w0  x3+d88-d18;
     al  w0     0      ;
     rl  w1  x1+0      ;
     wd. w1     b39.   ;    swop area length:= length / slice length;
     se  w0     0      ;    round up(swop area);
     al  w1  x1+1      ;   
     hs  w1  x3+d95-d18;
     al  w3     c37    ;
     rl. w2     j77.   ;
     jl.       (b16.)  ;    goto set alarm claims;
a21: al  w2  x3        ;    w2:=prog name
     jl. w3    (b70.)  ;    terminate access(program name)
     jl.        c132.  ;    alarm (file no text file)
\f


; pm 25.4.72                   boss 2, tpsjobstart,   ...39...


;replace job:
j41=k-b61
     bl  w1  x3+d88    ;    w1:=old jobstate
     al  w0     0      ;    clear jobstate;
     hs  w0  x3+d104   ;    finis cause:= 0;
     hs  w0  x3+d88    ;
     bl  w2  x3+d14+3  ;    if username change wanted then
     sz  w1     1<1    ;
     rs  w0  x3+d23    ;    clear jobname
     sn  w2     2      ;    if accountjob then
     am        -8      ;    send run job operation else
     al  w0     15     ;    send replace job operation
     rs  w0  x3+d87+2  ;    to psjobque
     rl  w2  x3+d91    ;
     al  w1  x3+d87    ;
     jl. w3    (b30.)  ;
     rl. w1    (b29.)  ;    page 1 :=jobfilepage
     rl  w0  x3+d0     ;
     rs  w0  x1+8
     jl.        a0.    ;
a9:  rl. w2     b11.   ; replace operation:
     bl  w0  x2+d104   ;   if finis cause = ok then
     sn  w0     0      ;    goto run job
     jl.        a6.    ;
j101=k+1
     al  w2  x3+218    ;
     jl. w3    (b70.)  ;   term access(jobfile)
     jl.        a20.   ;   goto offline job(psjob idle)

; page 1 = job file page,  page 4= job descr page
a5:  rl. w3     b11.   ; internal:
     al  w0     1<6    ;    jobstate.internal:=true;
     hs  w0  x3+d88    ;
     rl. w2    (b29.)  ;    d114:=virt of operation;
     rl  w1  x2+10     ;
     rs  w1  x3+d114   ;
     al  w0     c15    ;    command state := start;
     rs  w0  x3+d13    ;
     al  w0     0      ;    login claim:=0
     rs  w0  x3+d23    ;    username := 0;
     rs  w0  x3+d69    ;
     rs  w0  x3+d67    ;
     rl. w2     b61.+4 ;    w2:= op addr;
     dl  w1  x2+8      ;    param(2):= job file name;
     ds  w1  x3+d100+2 ;
     dl  w1  x2+12     ;
     ds  w1  x3+d100+6 ;
     dl  w1  x2+20     ;    move rb printer name;
     ds  w1  x3+d121   ;
     dl  w1  x2+24     ;
     rs  w0  x3+d119   ;    move parent rb device name table addr;
     ds  w1  x3+d122   ;    set host description
     dl  w1  x2+16     ;    std interval:= job file interval;
     ds  w1  x3+d101+2 ;
     al  w3  x3+d105   ;
     jd         1<11+72;    set base;
     rl. w1     b11.   ;
     al  w3  x1+d100   ;
     jd         1<11+76;    lookup head and tail(job file)
     rl. w3     b11.   ;
     al  w2     7      ;
     la  w2  x1        ;    w2 := key;
     se  w0     0      ;    if result <> 0 then
     jl.        c141.  ;      goto newjob file not exist;
     se  w2     3      ;    if key <> 3 then
     jl.        c142.  ;      goto newjob file not permanent;
     rl. w3     b14.   ;
     jl.        a14.   ;    go and get a jobfile;
\f


; re 13.8.74               boss 2 , tpsjobstart,    ...39a...


;accountjob entry:
j83=k-b61
     rl. w2     b11.   ;    w2:= psjob descr base;
     rl  w0  x2+d0     ;
     rl. w1    (b29.)  ;    page 1 := job file page;
     rs  w0  x1+8      ;
     al  w0     0      ;
     rs  w0  x2+d23    ;    username:=0;
     rs  w0  x2+d119   ;    parent rb name table addr:=0;
     rs  w0  x2+d120   ;    host description:=0;
     rs  w0  x2+d122   ;
     rs  w0  x2+d121-2 ;    rb printername:=0;
     jl. w3    (b1.)   ;    get pages;

; get a jobfile:
a14: rl. w2     b11.   ;    w2:=job descr base;
     dl  w1  x2+d100+2 ;    param(2):=area name;
     ds  w1  x3+6      ;
     dl  w1  x2+d100+6 ;
     ds  w1  x3+10     ;
     dl  w1  x2+d101+2 ;    ext(227):= std interval;
j6=k+1
     ds  w1  x3+227    ;
j169=k+1
     al  w0  x3+257    ;
     dl. w3     a11.   ;    w23:= init jobfile;
     jl. w1    (b22.)  ;    call init job file;
     jl.        c107.  ;    io alarm;
     jl.        c136.  ;    file too long;
\f


; pm 20.4.72                   boss 2, tpsjobstart, ...40...

; run job:
a6:  jl. w2     c24.   ;    prepare job file
     jl.        c107.  ;    io alarm
     al  w0     8      ;    abs or page:= 8;
j8=k+1
     rs  w0  x3+188    ;
     al  w0     d94    ;    last of line;
     al  w1     d4-2   ;    line base;
j9=k+1
     ds  w1  x3+187    ;   
     rl. w3     b11.   ;
     al  w0     c21    ;    state:= start;
     hs. w0     c1.    ;
     al  w0  x3+d11-2  ;    addr:= param - 2;
     rs  w0  x3+d8     ;

e.


; central read

b. a8  w.              ;
; next char:

     al  w1     0      ;
a8:  sn  w1     25     ;    if char=EM then
     jl.        c107.  ;    goto jobfile unreadable
     jl. w2     c20.   ; next line:  
     rl. w3     b11.   ; load w3:   w3:= psjob descr;
c0:  dl. w2     a6.    ; next char:   w2:= partial word; w1:= 0;
     sn  w2     0      ;
     jl.        a1.    ;    if w2 = 0 then goto next word;
a3:  ld  w2     8      ;    w1:= char; w2:= next partial word;
     rs. w2     a6.    ;    partial word:= w2;
     bl. w2  x1+a0.    ;    w2:= class(char);
     sl  w1     128    ;    if char > 127 then
     al  w2     10     ;      state:=10;
     sn  w2    -1      ;
     jl.        c0.    ;    if class = -1 then goto next char;
c1=k+1
     rl. w2  x2+0      ;    state:= state( class + state);
     bl  w0     4      ;
     hs. w0     c1.    ;
     bl  w2     5      ;    w2:= action(class + state);
c2:  jl.     x2        ;    goto action;
c17=a8-c2, c13=c0-c2   ;
a1:  rl. w2     a7.    ; next word:
     al  w2  x2+2      ;    w2:= curr addr:= curr addr + 2;
     rs. w2     a7.    ;
     rl  w2  x2-2      ;    w2:= curr word;
     jl.        a3.    ;

     0                 ;    nul
a6:  0                 ;    partial word
a7:  c32: 0            ;    curr addr
\f


; pm 3.2.72                    boss 2, tpsjobstart, ...41...


; central read

; next line:
c20: ws. w2     b61.   ;    w2:= rel return;
     bl. w1     c1.    ;    return:= rel return;
     ds  w2  x3+d6     ;    state save:= state;
     rl. w2    (b29.)  ;    w2:= corutine descr;
     dl  w1  x3+d3     ;
     rs  w0  x2+8      ;    page 1 descr:= job file;
     rs  w1  x2+12     ;    page 3 descr:= get line buf;
     rl  w2  x3+d8     ;
     ws  w2     6      ;
     rs  w2  x3+d8     ;
     jl. w3    (b1.)   ;    get pages
j170=k+1
     al  w0  x3+257    ;
     dl. w3     a5.    ;    get line point;
     jl. w1    (b22.)  ;    call get line;
     jl.        c107.  ;    io alarm;
     jl.       c103.   ;    line too long;
     al  w1     d4-2   ; line got:
j3=k+1
     rx  w1  x3+187    ;    line base:= d4; w1:= last word;
     rl. w3     b11.   ;
     rs. w3     b14.   ;    page 1:= page 4;
     al  w2  x3        ;
     wa  w2  x3+d8     ;
     rs  w2  x3+d8     ;
     rl. w2    (b29.)  ;
     rl  w0  x2+14     ;
     rs  w0  x2+8      ;
     al  w0     0      ;
     rs  w0  x2+12     ;    page 3:= empty;
     bl  w0  x2+4      ;    if testmode 2 then
     so  w0     2      ;
     jl.        a2.    ;    begin
     al  w1  x1-d4+2   ;      w0:= no of bytes < 6 +15;
     ls  w1     6      ;
     al  w0  x1+15     ;
     al  w1  x3+d4     ;      w1:= first byte;
     jl. w3    (b72.)  ;      prive out;
a2:  al  w1  x3+d4     ;    end;
     al  w0     0      ;
     ds. w1     a7.    ;    curr word:= line base; partial word:= 0;
     dl  w2  x3+d6     ;
     hs. w1     c1.    ;    state:=statesave
     jl.     x2+b61.   ;

j1:       157          ; get line(virt):
a5:  j0:  158          ; get line(rel):
\f


; pm 3.2.72                    boss 2, tpsjobstart, ...42...


; central read

; class (char)
;   -1:   blind
;    0:   letter
;    2:   digit
;    4:   ,
;    6:   SP
;    8:   ; NL FF EF
;   10:   other


h.                     ;
a0:  -1, 10, 10, 10, 10, 10, 10, 10, ;  NUL  ...
     10, 10,  8, 10,  8, -1, 10, 10, ;  BS HT NL VT FF VR  ...
     10, 10, 10, 10, 10, 10, 10, 10, ;  DL  E  ...
     10,  8, 10, 10, 10, 10, 10, 10, ;  CAN EM  ...

      6, 10, 10, 10, 10, 10, 10, 10, ;  SP  ...
     10, 10, 10, 10,  4, 10, 10, 10, ;  ( ) * + , ...
      2,  2,  2,  2,  2,  2,  2,  2, ;  0 1 2 3 4 5 6 7
      2,  2, 10,  8, 10, 10, 10, 10, ;  8 9 : ;  ...

     10, 10, 10, 10, 10, 10, 10, 10, ;  A   ...
     10, 10, 10, 10, 10, 10, 10, 10, ;  H   ...
     10, 10, 10, 10, 10, 10, 10, 10, ;  P   ...
     10, 10, 10, 10, 10, 10, 10, -1, ;  X   ...

     10,  0,  0,  0,  0,  0,  0,  0, ;  ...   a b c d e f g
      0,  0,  0,  0,  0,  0,  0,  0, ;  h i j k l m n o
      0,  0,  0,  0,  0,  0,  0,  0, ;  p q r s t u v w
      0,  0,  0,  0,  0,  0, 10, -1, ;  x y z æ ø aa   ...


e.                     ;
\f


; pm 3.2.72                    boss 2, tpsjobstart, ...43...


; central read

b. a8  h.              ;
  
       ; letter   digit    ,       SP      NL     other
a0=1-c1., a6,c3,  a0,c11, a0,c17, a0,c13, a0,c17, a0,c11  ; start
a1=1-c1., a6,c9,  a8,c5,  a1,c17, a1,c13, a0,c10, a0,c11  ; int or command
a2=1-c1., a6,c9,  a0,c11, a2,c17, a2,c13, a0,c10, a0,c11  ; command
a3=1-c1., a0,c11, a8,c5,  a3,c17, a3,c13, a0,c11, a0,c11  ; int
a4=1-c1., a7,c3,  a0,c11, a4,c17, a4,c13, a0,c11, a0,c11  ; text
a5=1-c1., a7,c3,  a8,c5,  a5,c17, a5,c13, a0,c11, a0,c11  ; int or text
a6=1-c1., a6,c4,  a6,c4,  a1,c18, a1,c7,  a0,c11, a0,c11  ; in command
a7=1-c1., a7,c4,  a7,c4,  a1,c19, a1,c8,  a0,c10, a0,c11  ; in text
a8=1-c1., a0,c11, a8,c6,  a1,c19, a1,c8,  a0,c10, a0,c11  ; in integer

g1=a8-a7, g2=2*g1, g3=3*g1, g4=4*g1
c. i178-1 , g5 = g4 z. ; size max allowed
c. -i178  , g5 = g2 z. ; size max not allowed
c21=a0, c33=a6

; the g names are used in parameter syntax lists
;           0     integer or command
;          g1     command
;          g2     integer
;          g3     text
;          g4     integer or text
;          g5     integer or optionally text

; the syntax actions are:

; c3   start text:           text:= char; count:= count + 1;
; c4   in text:              text:= text shift 8 + char;
; c5   start integer:        integer:= char; count:= count + 1;
; c6   in integer:           integer:= 10 * integer + char;
; c7   after command name:   lookup name; count:= command base; goto c8;
; c8   after param:          state:= state + kind(count);
; c9   next command name:    text:= char; switch to command action;
; c10  last command:         switch to command action; goto create job;
; c11  syntax alarm:         
;
; c13  blind:                goto next char;
; c17  skip line:            goto next line;
; c18  skip line after command name:   next line; goto c7;
; c19  skip line after param:          next line; goto c8;

e.                     ;
\f


; pm 3.2.72                    boss 2, tpsjobstart, ...44...

; central read

; syntax actions:

b. a10  w.              ;
; start text:
c3=-c2.
     rl  w2  x3+d7     ;    count:= count + 1;
     al  w2  x2+1      ;
     rs  w2  x3+d7     ;
     rl  w2  x3+d8     ;    w2:= addr;
     al  w0  x2+8      ;    addr:= w2 + 8;
     rs  w0  x3+d8     ;
     ld  w0    -100    ;    param(w2):= 0;
     ds  w0  x2+4      ;
     ds  w0  x2+8      ;
     rl. w3     b11.   ;    w3:= psjob descr;
     jl.        a0.    ;    goto next textword;

; in text:
c4=-c2.
     bl  w2  x3+d9     ;    w2:= text shift - 8;
     al  w2  x2-8      ;
     sl  w2     0      ;    if w2 >= 0 then
     jl.        a1.    ;    begin
     rl  w2  x3+d10    ;      w2:= text addr;
a0:  sl  w2 (x3+d8)    ; next textword:   if w2>= addr then
     jl.        b17.   ;      error(text too long);
     al  w2  x2+2      ;      text addr:= w2:= w2+2;
     rs  w2  x3+d10    ;      w2:= 16;
     al  w2     16     ;    end;
a1:  hs  w2  x3+d9     ;    text shift:= w2;
     ls  w1  x2        ;    param(addr):= param(addr) con char;
     wa  w1 (x3+d10)   ;
     rs  w1 (x3+d10)   ;
     jl.        c0.    ;    goto next char;

; start integer param:
c5=-c2.
     rl  w2  x3+d7     ;    count:= count + 1;
     al  w2  x2+1      ;
     rs  w2  x3+d7     ;
     rl  w2  x3+d8     ;    w2:= addr:= addr + 8;
     al  w2  x2+8      ;
     rs  w2  x3+d8     ;
     al  w1  x1-48     ;    w1:= digit;
     al  w0     0      ;    w0:= 0;
     ds  w1  x2-4      ;    param(addr):= digit;
     jl.        c0.    ;    goto next char;

; in integer:
c6=-c2.
     rl  w2  x3+d8     ;    param(addr):=
     rl  w0  x2-4      ;    param(addr) * 10 + char;
     wm. w0     b19.   ;
     al  w1  x1-48     ;
     wa  w0     2      ;
     rs  w0  x2-4      ;
     jl.        c0.-2  ;    goto load w3;
\f


; pm 3.2.72                    boss 2, tpsjobstart, ...45...


; central read

c18=-c2.
     jl. w2     c20.   ;    next line;

; after command name:
c7=-c2.
     al  w2     b51    ;    w2:= chain head;
     dl  w1  x3+d11+2  ;    w01:= command name;
     la. w1     b20.   ;
     ds. w1  x2+b53.   ;    dummy name:= command name;

; search command:
a2:  ba. w2  x2+b55.   ;    w2:= next command chain;
     sn. w0 (x2+b54.)  ;    if name(w2) <> command name
     se. w1 (x2+b53.)  ;
     jl.        a2.    ;    then goto search command;
     rs  w2  x3+d7     ;
     rs  w2  x3+d12    ;    count:= switch:= w2;

     sn  w2     b51    ;    if w2 = chain head then goto
     jl.        c105.  ;    command not found;
     sl  w2 (x3+d13)   ;    if w2 >= command state
     jl.        c106.  ;    then syntax error;
     al  w0  x3+d11-2  ;    addr:= -2;
     rs  w0  x3+d8     ;

; set kind:
a4:  bl. w0  x2+b56.   ;    state:= state + kind(count);
     ba. w0     c1.    ;
     hs. w0     c1.    ;
     jl.        c0.    ;    goto next char;

; skip line after param:
c19=-c2.
     jl. w2     c20.   ;    next line;

; after param: (test state text max 11 chars and integers<=8388607)
c8=-c2.
     rl  w2  x3+d8     ;  w2:=ptr to last param word
     rl  w0  x2-6      ;  w0:=first word of param
     se  w0     0      ;  if text (w0<>0) then
     jl.        a8.    ;   goto test textparam
     rl  w0  x2-4      ;  w0:=integer param
     sh  w0    -1      ;  if integer param < -1 then
     jl.        b17.   ;   goto alarm - number too large
     jl.         a9.   ;
a8:                    ;  test text param:
     rl  w0  x2        ;  w0:=last word of text param
     sz  w0     255    ;  if last char<>0 then
     jl.        b17.   ;   goto alarm - text too long
a9:                    ;
     rl  w2  x3+d7     ;    w2:= count;
     jl.        a4.    ;    goto set kind;
\f


; pm 3.2.72                    boss 2, tpsjobstart, ...46...


; central read

; last command:
c10=-c2.
     rl  w2  x3+d8     ;    if text is more than 11 chars then
     rl  w0  x2-6      ;      error(text too long);
     se  w0     0      ;
     rl  w0  x2        ;
     sz  w0     255    ;
     jl.        b17.   ;
     rl  w2  x3+d7     ;    if kind(count) >= g2 then
     bl. w0  x2+b56.   ;
     sl  w0     g2     ;
     jl.        c106.  ;    syntax error;
     al  w1    -1      ;

; next command name:
c9=-c2.
     rs  w1  x3+d7     ;    count:= if last command then -1 else char;
     al  w1    -1      ;    param(addr + 8):= -1;
     am     (x3+d8)    ;
     rs  w1     2      ;

; switch to command action:
     dl. w1     c32.   ;    save input buffer point;
     ws  w1     6      ;
     ds  w1  x3+d5     ;
     rl  w1  x3+d12    ;    w1:= switch;
     bl. w2  x1+b67.   ;    w2:= rel ref virt page;
     bl. w3  x1+b68.   ;    w3:= rel entry;
     rl. w2  x2+b61.   ;    w2:= virt page;
     jl. w1    (b28.)  ;    call(commandaction)
     jl.        a7.    ;+2  ok
     jl.        c114.  ;+4  limited
     jl.        b17.   ;+6  param
     jl.        c41.   ;+8  device unknown
a7:  dl  w1  x3+d5     ;    set 32 to input buffer point;
     wa  w1     6      ;
     ds. w1     c32.   ;
     rl  w1  x3+d7     ; next command:
     sn  w1    -1      ;    if w1 = -1 then goto create job;
     jl.        b21.   ;
     al  w0     c33    ;    set state to in command;
     hs. w0     c1.    ;
     al  w0  x3+d11-2  ;    addr:= -2;
     rs  w0  x3+d8     ;
     jl.        c3+c2. ;    goto start text;
j55:      473          ;    virt of create job page;
a6:       c34          ;    rel entry of create job page;
;go job:
c23:                   ;
     jl. w2     c24.   ;    prepare jobfile
     jl.        c107.  ;    io alarm
b21: dl. w3     a6.    ;
     jl.       (b16.)  ;
e.
\f


; pm 3.2.72                    boss 2, tpsjobstart, ...47...


b. a4 w.
; command table:
a2=b6-b61

; name   ,     chain    , virt, rel,    param types

<:job:>,0, h. b55. ,g0=k, a3  , c60, g3, g2, 0, g1, w.   a0:
<:load:> , h. g0.-1,g0=k, b66 , c62, g4, g3,    g1, w.   a1:
<:stat:> , h. g0.-1,g0=k, a2  , c63, g2,        g1, w.
<:size:> , h. g0.-1,g0=k, a2  , c64, g5,        g1, w.
<:inte:> , h. g0.-1,g0=k, a2  , c65, g2,        g1, w.
<:prog:> , h. g0.-1,g0=k, a2  , c66, g3,        g1, w.
<:buf:>,0, h. g0.-1,g0=k, a2  , c67, g2,        g1, w.
<:area:> , h. g0.-1,g0=k, a2  , c68, g2,        g1, w.
<:key:>,0, h. g0.-1,g0=k, a2  , c69, g2,        g1, w.
<:perm:> , h. g0.-1,g0=k, a2  , c90, g3, g2, 0, g1, w.
<:temp:> , h. g0.-1,g0=k, a2  , c91, g3, g2, 0, g1, w.
<:late:> , h. g0.-1,g0=k, a2  , c93, g2,  0,    g1, w.
<:moun:> , h. g0.-1,g0=k, a2  , c94, g2,        g1, w.
<:outp:> , h. g0.-1,g0=k, a2  , c95, g2,        g1, w.
<:time:> , h. g0.-1,g0=k, a2  , c96, g2,  0, 0, g1, w.
<:acco:> , h. g0.-1,g0=k, a2  , c97, g2,        g1, w.
<:devi:> , h. g0.-1,g0=k, a4  , c98, g4,        g1, w.
<:tape:> , h. g0.-1,g0=k, a4  , c99, g2,        g1, w.
<:cbuf:> , h. g0.-1,g0=k, a2  , c92, g2,        g1, w.
<:susp:> , h. g0.-1,g0=k, a2  , c89, g2,        g1, w.
<:core:> , h. g0.-1,g0=k, a2  , c58, g2,        g1, w.
<:onli:> , h. g0.-1,g0=k, a2  , c59, g3,        g1, w.
<:mini:> , h. g0.-1,g0=k, a2  , c56, g3,        g1, w.
<:prio:> , h. g0.-1,g0=k, a2  , c85, g2,        g1, w.
<:wait:> , h. g0.-1,g0=k, a2  , c86, g2,        g1, w.
<:pres:> , h. g0.-1,g0=k, a2  , c87, g3,        g1, w.
<:cont:> , h. g0.-1,g0=k, a4  , c74, g3,        g1, w.
<:link:> , h. g0.-1,g0=k, a2  , c70, g2,        g1, w.

;param type: 0 integer or next command
;           g1 next command
;           g2 integer
;           g3 text
;           g4 integer or text
;           g5 integer or optionally text

b51=0
b54:      0            ;    name
b53:      0            ;    name + 2
b55: h.   g0.-1, w.    ;    chain
          <:start:>    ;    initial text for error printout
c54=k-2-b53            ;
b67= b55 +1            ;    rel addr of virt
b68= b67 +1            ;    rel start addr
b56= b68 +1            ;    parameter type list
c22=0, c15=a0-b55, c16=a1-b55, c38=0
a3=k-b61, j120: 472    ;    virt of codepage 1
a4=k-b61, j146: 473    ;    virt of codepage 4
e.
\f


; pm 3.2.72                    boss 2, tpsjobstart, ...48...


; command actions

b. a15 w.              ;
a11: <:no:>
a12: <:yes:>
a15: <:max:>
c87=k-b61              ; preserve catalog:
     am         d134-d75;
c59=k-b61              ; online conversation:
     am         d75-d102;
c56=k-b61              ; information option:
     al  w2     d102   ;
     dl  w1  x3+d11+2  ;
     sn. w0    (a11.)  ;    param:=
     jl.        a13.   ;    if <:no:> then 0 else
     sn. w0    (a12.)  ;    if <:yes:> then 1 else
     se  w1     0      ;    goto param;
     jl.        c72.   ;
     am         1      ;
a13: al  w0     0      ;
     rs  w0  x3+d11+2  ;    param:=1
            am  x2 -d148;
c70=k-b61,  am  d148-d68; link

c92=k-b61,  am  d68-d132; cbuf
c85=k-b61,  am  d132-d71; priority
c89=k-b61,  am  d71-d49; suspends
c63=k-b61,  am  d49-d39; stations
c65=k-b61,  am  d39-d35; internals
c67=k-b61,  am  d35-d33; buf
c68=k-b61,  am  d33-d41; areas
c69=k-b61,  am  d41-d43; key
c94=k-b61,  am  d43-d31; mounts
c97=k-b61              ; account
     al  w1     d31    ;    w1:=kind;
     rl  w0  x3+d11+2  ;    w0:= param;
a1:  wa. w1     b11.   ;
     bz  w2  x1+d81    ; test against max byte:
     sl  w0  x2+1      ;    if w0 > max byte(kind) then
     jl.        a8.    ;      goto alarm;
     hs  w0  x1        ;    resource(kind) := w0;
     dl  w3  x3+2      ;
     jl.       (b16.)  ;    return;
\f


; re 14.8.74                   boss 2, tpsjobstart    ...48a...


c64=k-b61              ; size:
c. i178-1
     dl  w1  x3+d11+2  ;
     sn  w0     0      ;    if text param then
     jl.        a14.   ;      begin
     sn. w0    (a15.)  ;      if param <> <:max:> then
     se  w1     0      ;
     jl.        c72.   ;        goto param;
     al  w0     0      ;
j188=k+1
     ac  w1     29     ;      param(1) := maxsize;
j189=k+1
     al  w1  x1+16     ;
     ls  w1     9      ;
     ds  w1  x3+d11+2  ;
z.                     ;      end;
a14: am         d47-d138;
c86=k-b61              ;
     am         d138-d77; wait:
c58=k-b61              ; corelock:
     al  w1     d77    ;    size:= param(1);
     rl  w0  x3+d11+2  ;
a4:  wa. w1     b11.   ; test against max word:
     sh  w0 (x1+d81)   ;    if w0 > max word(kind) then
     jl.        4      ;
     jl.        a8.    ;      goto alarm;
     rs  w0  x1        ;    resource(kind):= w0;
     dl  w3  x3+2      ;
     jl.       (b16.)  ;    return;


a8:  dl  w3  x3+2      ; alarm:
     al  w3  x3+2      ;    return:= return + 2;
     jl.       (b16.)  ;    return ...;

c66=k-b61              ; program:
     rl. w2     b11.   ;
     dl  w1  x3+d11+2  ;
     ds  w1  x2+d18+2  ;    program name:= param(1);
     dl  w1  x3+d11+6  ;
     ds  w1  x2+d18+6  ;
     dl  w3  x3+2      ;
     jl.       (b16.)  ;    return;


c95=k-b61              ; output:
     rl  w1  x3+d11+2  ;
     al  w0     0      ;
     wd. w1     a0.    ;
     al  w0  x1+1      ;    w0:= param / chars per disc slice;
     al  w1     d45    ;    w1:= kind;
     jl.        a1.    ;    goto test again max byte;

a0:  j93:    0         ;    chars per disc slice;
\f


; pm 3.2.72                    boss 2, tpsjobstart, ...49...
;command actions


c93=k-b61              ; latest:
     rl  w2  x3+d11+2  ;
     wm. w2     a5.    ;    w2:= 60 * param(1);
     dl  w1  x3+d11+10 ;
     sn  w0     0      ;    if param(2) then
     wa  w2     2      ;    w2:= w2 + param(1);
     wm. w2     a6.    ;
     ld  w2    -7      ;    w2:= w2 * 600000 shift(-13);
     rl. w1     b11.   ;
     sh  w2 (x1+d27)   ;    max wait:= max(w2, respite);
     rl  w2  x1+d27    ;
     rs  w2  x1+d66    ;
     dl  w3  x3+2      ;
     jl.       (b16.)  ;    return;
a5:  60                ;
a6:  600000>6          ;
c96=k-b61              ; time:
     al  w2  x3+d11    ;    i:= 1;
     rl  w1  x2+2      ;    w1:= param(i);
a2:  rl  w0  x2+8      ; next param:
     se  w0     0      ;    if param(i+1) then begin
     jl.        a3.    ;      w1:= 60 * w1 + param(i+1);
     wm. w1     a5.    ;      i:= i + 1;
     al  w2  x2+8      ;      goto next param;
     wa  w1  x2+2      ;    end;
     jl.        a2.    ;
a3:  wm. w1     a7.    ;    w0:= w1 * 10000 shift(-13);
     ld  w1     15     ;
     al  w1     d53    ;    goto test against max word;
     jl.        a4.    ;

a7:  625               ;
e.                     ;


b. a11  w.             ;

c90=k-b61              ; perm:
     jl. w2     a3.    ;    check disc or drum;
     jl.        a5.    ;    if not then goto search kit;
     rl. w2     b11.   ;

     al  w2  x2+d55+1  ;    ref slices:= disc rest key 3;
                       ; set(slices):
a0:  wa  w2     2      ;    ref slices:= ref slices + disc or drum;
     al  w1  x2-1      ;    ref entries:= ref slice -1;

a1:  ds. w1     a8.    ; set(entries, slices):
     al  w0     0      ;
     rl  w1  x3+14     ;
     wd. w1     a7.    ;    slices:= slice param /
     se  w0     0      ;
     al  w1  x1+1      ;
     sl  w1     2047   ;    if slices > byte value then
     al  w1     2047   ;      slices:=max slices;
     hs  w1  x2        ;    slice length;
     dl  w1  x3+22     ;
     sn  w0     0      ;    if param type = integer then
     hs. w1    (a8.)   ;    entries:= entries param;

     dl  w3  x3+2      ;
     jl.       (b16.)  ;    page jump(return);
\f


; pm 20.4.72                   boss 2, tpsjobstart, ...50...
; command actions

c91=k-b61              ; temp:
     jl. w2     a3.    ;    check disc or drum;
     jl.        a10.   ;    if not then goto param error;
     rl. w2     b11.   ;
     al  w2  x2+d58+1  ;    ref slices:= disc rest key 1
     wa  w2     2      ;    + disc or drum;
     rl. w1     b11.   ;
c.i27,al w1  x1+d59 z. ;    ref entries:= drum rest key 1;
c.-i27,al w1 x1+d58 z. ;
     jl.        a1.    ;    goto set(entries, slices);

a3:  dl  w1  x3+6      ; test disc or drum:
     sn. w1    (b63.+2); 
     se. w0    (b63.)  ;    if not disc then
     jl.        a4.    ;    goto test drum;

     al  w1     0      ;    w1:= disc;
     rl. w0     b63.+8 ;    w0:= slice length disc;
     jl      x2+2      ;    goto return + 2;

a4:  c.i27             ; test drum:
     sn. w1    (b65.+2);
     se. w0    (b65.)  ;    if not drum or drum not present then
z.   jl      x2        ;    goto return;
     rl. w0     b65.+8 ;    w0:= slice length drum;
     al  w1     6      ;    w1:= drum;
     jl      x2+2      ;    goto return + 2;

a7:  0                 ;
a8:  0                 ;
a10: am        -2      ;    param
c72=a10
a11: al  w1     6      ;    device unknown
     dl  w3  x3+2      ;
     wa  w3     2      ;
     jl.       (b16.)  ;

a5:  a2=d28+d57+1-14   ; search kit:
     rl. w2     b11.   ;
     al  w2  x2+a2     ;    w2:= kit:= kit table base;

a6:  al  w2  x2+14     ; rep:   w2:= kit:= kit + length;
     dl  w1  x2-9      ;
     sn  w0     0      ;    if empty(kit) then
     jl.        a11.   ;    goto unknown kit;

     sn  w0 (x3+4)     ;
     se  w1 (x3+6)     ;
     jl.        a6.    ;    if name(kit) <>
     dl  w1  x2-5      ;    name param then
     sn  w0 (x3+8)     ;    goto rep;
     se  w1 (x3+10)    ;
     jl.        a6.    ;
                       ;    w2:= ref slices(kit);
     al  w1  x2-1      ;    w1:= ref entries(kit);
     rl  w0  x1+2      ;    w0:= slice length(kit);
     jl.        a1.    ;    goto set(entries, slices);

e.                     ;
\f


; pm 20.4.72                   boss 2, tpsjobstart, ...51...

; alarms from code page 3.

b. a1  w.              ;

c103:rl. w3     b11.   ;
     am         1      ; cause 41:   line too long after <>
c106:am         1      ; cause 40:   syntax at <>
b17: am         1      ; cause 39:   param at <>
c105:am         1      ; cause 38:   option unknown <>
c114:al  w0     37     ; cause 37:   limited <>
     hs  w0  x3+d104   ;
     rl  w1  x3+d12    ;
     dl. w1  x1+b53.   ; w0,w1 := name of option
     ds  w1  x3+14     ; store option for use in error printing
     ld  w1    -100     ;
     ds  w1  x3+18     ;
     jl.        a1.    ;
c11=c106-c2            ; syntax alarm from state table
c41: dl  w1  x3+6      ;
     ds  w1  x3+14     ;
     dl  w1  x3+10     ;
     ds  w1  x3+18     ;
     am         42-45  ; cause 42:   device unknown <dev>
c132:am         45-18  ; cause 45: file is no text file
c82: am         18-11  ; cause 18:   convert file unreadable;
c136:am         11-5   ; cause 11:   job file too long
c107:am         5-3    ; cause 5 :   job file unreadable
c141:am         3-2    ; cause 3 :   newjob file not exist
c142:al  w0     2      ; cause 2 :   newjob file not permanent
     rl. w3     b11.   ;
     hs  w0  x3+d104   ;
a1:  rs. w3     b14.   ;
     rl. w1    (b29.)  ; current coroutine desc
     rl  w0  x1+14     ;
     rs  w0  x1+8      ;
     rl  w0  x3+d13    ; load command state
     rl  w1  x3+d23    ; load user name
     al  w3     c37    ;    set alarm claim;
     sn  w0     c16    ;
     al  w3     c80    ;    create alarm job;
     sn  w1     0      ;
     al  w3     c110   ;    request alarm;
     rl. w2     j77.   ;
     jl.       (b16.)  ;
j77:      473          ; virtual add of include user

e.                     ;
i. e. ; b and g names code page 3
g7=k-g8
\f


; pm 3.2.72                    boss 2, tpsjobstart, ...52...
; codepage 4
g10:

b. b80  w.

b61:      0            ;    page 0 base
b14:      0            ;     -   1
          0            ;     -   2
b2:       0            ;     -   3
b11:      0            ;     -   4
     14<12 + 0         ;    page ident:  code page 4
b1:  j147:7            ;    get page
b4:  j80: 74           ;    catalog sem
     j161:-2           ;    boss private interval
b8:  j91: -1           ;
b16: j148:8            ;    page jump
b20:      -1<16        ;    constant
b26: j149:2            ;    send and wait fast
b28: j122:25           ;    call
b29: j150:26           ;    curr corutine descr
b30: j151:6            ;    open op
b31: j152:5            ;    lock op
b33: j153:67           ;    banker que
b35: j154:4            ;    open
b36: j155:3            ;    lock
b47: j156:52           ;    request line free
b48: j157:51           ;    request que
     j75: h. 0,r.e17   ;    device no table
b78: w.                ;    top deviceno table
b73:      0, 0         ;    device name tables

       <:plot:>, <:punc:>, <:card:>, <:prin:>, 0,0
b75:
b76=b73-b75            ;
b72: j92: 33           ;    release access
b74:      4<12         ;    constant
\f


; pm 3.2.72                    boss 2, tpsjobstart, ...53...

b. a10 w.

; control command

c74=k-b61
     al. w2     j75.+e51-e24-1;  w2:=ref first std reader device - 1
     rs  w2  x3+d11+8  ;    save table reference
a10: rl  w2  x3+d11+8  ;
     al  w2  x2+1      ;    w2:=ref next device
     sl. w2     j75.+e51+e52-e24;  if top of readers then
     jl.        a4.    ;    goto device unknown
     rs  w2  x3+d11+8  ;
     bz  w2  x2        ;    w2:=device number
     ls  w2     1      ;
     wa  w2     74     ;    w2:=name table address of device
     rl  w2  x2        ;    w2:=process description of device
     dl  w1  x2+4      ;    
     sn  w0 (x3+d11)   ;    test device name
     se  w1 (x3+d11+2) ;
     jl.        a10.   ;    if not ok
     dl  w1  x2+8      ;
     sn  w0 (x3+d11+4) ;
     se  w1 (x3+d11+6) ;
     jl.        a10.   ;    then goto next reader
     bz  w0  x3+d51    ;
     se  w0     0      ;    if <tapes> set already then
     jl.        a5.    ;    goto limited
     rl  w1  x3+d11+8  ;    w2:=ref reader device
     sh. w1     j75.+e51+e55-1;  if not exclusive reader
     ba. w0     1      ;    then simulate <tapes 1>
     hs  w0  x3+d51    ;  
     bz  w1  x1        ;    w1:=reader device no
     al  w0     0      ;
     ds  w1  x3+d11+2  ;    set parameter for <device command>


; device command:
c98=k-b61              ;
     dl  w1  x3+d11+2  ;    if param = text then
     sn  w0     0      ;
     jl.        a0.    ;    begin
     sn. w0    (a6.)   ;      if param= <:no:> then
     jl.        a7.    ;      goto clear;
     la. w1     b20.   ;      reduce to 4 characters;
     ds. w1     b73.+2 ;
     al  w2     0      ;      i:= 0;
a1:  al  w2  x2-4      ; rep1:   i:= i - 1;
     sn. w0 (x2+b75.)  ;      if w01 <> device name(i) then
     se. w1 (x2+b75.+2);
     jl.        a1.    ;      goto rep;
     sn  w2     b76    ;      if i = dev name base then
     jl.        a4.    ;      goto device alarm;
     as  w2    -2      ;
     jl.        a2.    ;    end else begin

a0:  hs. w1     b78.   ;
     sz  w1    -1<11   ;    if device > 2047 then
     jl.        a4.    ;    goto device alarm;
     al  w2    -e17-1  ;    i:= - no of devices;
a3:  al  w2  x2+1      ; rep2:   i:= i + 1;
     bl. w0  x2+b78.   ;
     se  w0  x1        ;      if w1 <> dev no(i) then
     jl.        a3.    ;      goto rep;
     sn  w2     0      ;      if i = 0 then
     jl.        a4.    ;      goto device alarm;
a2:  al  w0     1      ;    end;
     al  w1     0      ;   
     ld  w1  x2+23     ;    device:= device or 1 shift (23-i);
     rl. w2     b11.   ;
     lo  w0  x2+d30    ;
     lo  w1  x2+d30+2  ;
     sz  w0 (x2+d65)   ;    if device and device max <> 0 then
     jl.        a5.    ;    goto device alarm;
     sz  w1 (x2+d65+2) ;
     jl.        a5.    ;
     ds  w1  x2+d30+2  ;
a8:  dl  w3  x3+2      ;    return;
     jl.       (b16.)  ;

a7:  rl.w2     b11.    ; clear:
     rl  w0  x2+d30    ;
     la. w0     a9.    ;    device:= 1 special bit in device
     al  w1     0      ;    the rest is cleared;
     ds  w1  x2+d30+2  ;
     jl.        a8.    ;    goto return;
a4:  am  w0     4      ; device unknown:
a5:  al  w0     2      ; limited:
     dl  w3  x3+2      ;
     wa  w3     0      ;
     jl.       (b16.)  ;
a6:  <:no:>            ;
a9:  1<23              ;

; tape command

c99=k-b61
     al  w1     d51    ;    w1:=address of <tapes>
     wa. w1     b11.   ;
     rl  w0  x3+d11+2  ;    w0:=param 1
     bz  w2  x1+d81    ;    if w0>max value then
     sl  w0  x2+1      ;
     jl.        a5.    ;    goto limited
     bz  w2  x1        ;
     se  w2     0      ;    if <tapes> set already then
     jl.        a5.    ;    goto limited
     hs  w0  x1        ;    else set tapes
     rs  w2  x3+d11+2  ;    simulate <device 0>
     jl.        c98.+b61;

e.                     ;
\f


; pm 3.2.72                    boss 2, tpsjobstart, ...54...


; include user:

b. a15  w.             ;
a1=k+1,   <: <0>0:>    ;    const.
a6:       0            ;    work
a7:       10           ;    constant
a9:       0            ;    line addr
a11:      <: clear:>
c39=k-b61              ; include user and wait device:
     rl. w2     b47.   ;    lock request line free;
     jl. w3    (b31.)  ;
     al  w2  x1        ;    line:= <(job name)>;
     dl  w1  x3+d19+2  ;
     ds  w1  x2+8      ;
     dl  w1  x3+d19+6  ;
     ds  w1  x2+12     ;
     dl. w1     a11.+2 ;    <: clear:>;
     ds  w1  x2+16     ;
     rl. w1    (b29.)  ;
     rl  w0  x1+10     ;
     rs  w0  x3+d93    ;
     am      x2+20     ;
c61=k-b61              ; include user:
     al  w1     0      ;
     rs. w1     a9.    ;
     rl. w2     b11.   ;    w2:= psjobdescr abs;
     al  w3  x2+d105   ;    w3:= addr of 0;
     rl  w1     66     ;    w01:= boss std interval;
     dl  w1  x1+78     ;
     jd         1<11+72;    set base;

     al  w3  x2+d19    ;    w3:= job name addr;
     dl  w1  x2+d30+2  ;    w01:= device bits;
     al. w2     b78.-1 ;    w2:= top of device no table -1;
     la. w0     a3.    ;    w01:= w01 and includable devices;
     la. w1     a5.    ;
a0:  nd. w1     3      ; rep:   for w01:= w01 shift 1 until
     al  w2  x2        ;    w01 >= 1 shift 46 do w2:= w2 - 1;
     sn  w0     0      ;    if w01 = 0 then
     jl.        a2.    ;    goto exit;
     ds. w1     b73.+2 ;    b73:= w01;
     bz  w1  x2        ;    w1:= device no(x2);
     sh. w2  b78.-e17+e25-1;  if device index < mt then
     jl.        a12.   ;      goto next;
     al  w0     0      ;
     sl. w2     b78.-e17+e28+e19    ;  if device not disc then
     sl. w2     b78.-e17+e28+e19+e52+e23;
     jd         1<11+12;    include user(device no, job name);
     se  w0     0      ;    if result <> 0 then
c.-1, o32, z.          ;    (bossfault xref)
     jd        -32     ;    boss alarm;
     sn. w0    (a9.)   ;    if wait device 
     jl.        a12.   ;
     sh. w2  b78.-e17+e28+e19+e52-1;  and device index >= process device
     jl.        a12.   ;      then

\f


;pm 17.3.72                    boss 2, tpsjobstart, ...55...
;include user
     rs. w0     a6.    ;    convert devno to text
a10: sh  w1     9      ;
     jl.        a8.    ;
     wd. w1     a7.    ;
     ba. w0     a1.    ;
     rx. w1     a6.    ;
     ld  w1     -8     ;
     rx. w1     a6.    ;
     jl.        a10.   ;

a8:  wa. w1     a1.    ;
     al  w0  x1        ;
     rl. w1     a6.    ;
     ds. w1    (a9.)   ;
     rl. w1     a9.    ;
     al  w1  x1+4      ;
     rs. w1     a9.    ;
a12: dl. w1     b73.+2 ;    w01:= a1 - 1 shift 46;
     ws. w0     a4.    ;
     jl.        a0.    ;    goto rep;

a2:  rl. w3     b14.   ; exit:
     rl. w1     a9.    ;
     sn  w1     0      ;
     jl.        a13.   ;    if wait device then
     al  w0  x1-8      ;    begin
     rl. w1     b61.+4 ;
     ws  w0     2      ;
     sn  w0     12     ;      if any included then
     jl.        a14.   ;
     al  w3     1<3+1<1;    set line
     ds  w0  x1+4      ;
     jl.        a15.   ;    else
a14: rl. w1     b61.+4 ;    w1:= request line abs;
     al  w0     0      ;
     rs  w0  x3+d93    ;    request line pending:= false;
     am         b47-b48;    opench(request free);
a15: rl. w2     b48.   ;
     jl. w3    (b30.)  ;    end;
a13: dl  w3  x3+2      ;
     jl. w1    (b16.)  ;    return jump;

a3:       0            ;    includeable devices;
a5:  j96: 0            ;
a4:       1<22         ;

e.                     ;
\f


; pm 3.2.72                    boss 2, tpsjobstart, ...56...

;copy area:      page 1=job descr page
; page 1 + 0:   return virt
;          2:      -   rel
;          4:   relative of input area name
;          6:       -    -  output  -   -

b. a6  w.              ;
c36=-b61.
     rl. w0     a5.    ;    page 3 descr := savebuf
     rl. w1    (b29.)  ;
     rs  w0  x1+12     ;
     rl. w2     b4.    ;    lock(catalock)
     jl. w3    (b36.)  ;

     al  w1    -i62    ;    segm := -length savebuf
     al  w2     0      ;    mode:= 0;
     rs  w2  x3+d89    ;
     al  w2     5      ;    op := output
     ds  w2  x3+d1+2   ;

a1:  dl  w2  x3+d1+2   ; rep:
     ac  w2  x2-8      ;    op:=messop:=if op=input then output else input
     hs  w2  x3+d89    ;
     sn  w2     3      ;    if op=input then
     al  w1  x1+i62    ;    segm:=mess segm:=segm+length savebuf
     rs  w1  x3+d89+6  ;
     ds  w2  x3+d1+2   ;

     rl. w1     b2.    ;    messfirst:=bufbase
     al  w0  x1        ;    messlast:=bufbase+length-2
     wa. w1     a2.    ;
     ds  w1  x3+d89+4  ;

     al  w1  x3+d89    ;    w1:=messadr
     wa  w2     6      ;    w2:=nameadr
     wa  w3  x2+1      ;
     al  w2  x3        ;
     jl. w3    (b26.)  ;    send and wait fast
     rl  w1  x1+2      ;    w1:=bytes transferred
     sz. w0    (a3.)   ;    if hard error then
     jl.        a0.    ;
     sz. w0    (a4.)   ;    if -, end of medium or
     se  w1     0      ;    bytes transferred<>0 then
     jl.        a1.    ;    goto rep
     rl  w2  x3+d1+2   ; 
     se  w2     5      ;    if operation = input then
     jl.        a1.    ;    goto rep;

a6:  rl. w2    (b29.)  ;    page 3 descr := 0
     rs  w1  x2+12     ;
     rl. w2     b4.    ;    open(catalock)
     jl. w3    (b35.)  ;
     dl  w3  x3+2      ;    return
     al  w3  x3+2      ;
     jl.       (b16.)  ;
a0:  rl  w2  x3+2      ;
     al  w2  x2-2      ;
     rs  w2  x3+2      ;
     rs  w0  x3+d1     ;     save status;
     jl.        a6.    ;
a2:  i62*512-2         ;
a3:  -1-1<18-1<1       ;
a4:  1<18              ;
a5: j66: 233           ;
e.
\f


; pm 3.2.72                    boss 2, tpsjobstart, ...57...

b. a11  w.              ;

; create job:

c34=-b61.              ;
     rl. w1    (b29.)  ;    page 1 descr:=page 4 descr:=psjobdescr
     rl  w0  x1+14     ;
     rs  w0  x1+8      ;
     rl. w3     b11.   ;    w3:=jobdescr base
     rs. w3     b14.   ;
     rl  w1  x3+d13    ;    if commandstate<> claims set then
     se  w1     c16    ;
     jl. w1     c135.  ;    set claims

     bl  w0  x3+d88    ;
     so  w0     1<5    ;    if card job then
     jl.        a0.    ;    begin
     bl  w1  x3+d30    ;    if online card then
     so  w1     1<8    ;      begin
     jl.        a5.    ;      
     al  w1  x1-1<8    ;      if card file no + 1 >=  card file count then
     bl  w2  x3+d116   ;
     al  w2  x2+1      ;      online card := false;
     sl  w2 (x3+d118)  ;
     hs  w1  x3+d30    ;      end
     jl.        a0.    ;    else
a5:  al. w1     a0.    ;
c123:dl. w3     a1.    ;    call empty cardreader;
     jl.       (b28.)  ;    end;
j123:471               ;
a1:  c40               ;

a0:  bl  w0  x3+d88    ;    if reader reserved then
     so  w0     1      ;
     jl.        a9.    ;    begin
     rl. w0     b74.   ;
     rs  w0  x3+d87+2  ;
     bz  w0  x3+d131   ;      set reader device number
     rs  w0  x3+d87+6  ;      in operation
     al  w1  x3+d87    ;
     rl. w2     b33.   ;      open op(banker que, release reader);
     jl. w3    (b30.)  ;
     rl  w2  x3+d82    ;
     jl. w3    (b36.)  ;      lock(psjob buf);
                       ;    end;
a9:  bl  w0  x3+d51    ;    if tapes = 0 then
     se  w0     0      ;
     jl.        a10.   ;    begin

     al  w0     19     ;
     hs  w0  x3+d14+2  ;
     al  w1  x3+d14    ;
     rl. w2     b33.   ;
     jl. w3    (b30.)  ;      open op(banker que, unclaim reader);
     rl  w2  x3+d82    ;
     jl. w3    (b36.)  ;      lock(psjob buf);
a10:                   ;    end;
     bl  w0  x3+d88    ;    if alarm job then
     sz  w0     1<4    ;    goto end alarm job;
     jl.        a11.   ;

\f


; pm 3.2.72                    boss 2, tpsjobstart, ...58...


; reserve all:
     al  w0     1      ;    
     hs  w0  x3+d14+2  ;    opcode:= reserve;
     al  w0     7      ;
     hs  w0  x3+d14+4  ;    all:= true;
     al  w0     0      ;
     hs  w0  x3+d14+5  ;    stations:= 0;
c.-i27,rl w0 x3+d58 z. ;
c.i27,rl w0  x3+d59    ;
     hl  w0  x3+d58+1z.;
     rs  w0  x3+d14+6  ;    discclaim:= temp entries, temp disc slices;
     al  w1  x3+d14    ;    w1:= op addr;
     rl. w2     b33.   ;    w2= banker que sem;
     jl. w3    (b30.)  ;    open op(banker que, reserve);

     rl  w2  x3+d82    ;
     jl. w3    (b36.)  ;    lock(psjob buf);
     bl  w0  x3+d14+2  ;
     sn  w0     0      ;    if job killed then
     jl.        c134.  ;    goto kill;
     bl  w0  x3+d14+3  ;
     se  w0     2      ;    if accountjob then
     jl.        a2.    ;      begin
     al  w0     1<10   ;     
     hs  w0  x3+d88    ;      set jobstate, replace;
     rl. w1    (b29.)  ;      page 3 := virt account buf;
     rl. w0     a3.    ;
     rs  w0  x1+12     ;
     dl. w3     a4.    ;      call (prepare account);
     jl. w1    (b28.)  ;      end;
a2:
     dl. w3     6      ;    goto job birth
     jl.       (b16.)  ;
j121: 472
     c118
a3: j172: 435          ; virt account buf

    j173: 436          ; virt,
a4: j174: 432          ;  rel prepare account

j159:451               ;    call set claims
     c27
c135:dl. w3    -2      ;
     jl.       (b28.)  ;
\f


; re 6.2.75                     boss 2, tpsjobstart    ...58a...


; alarms from code page 4.

a11:                   ; end alarm job:
e.
b. a8  w.              ;
     rl. w3     b11.   ;
     bl  w0  x3+d104   ;
     sn  w0     6      ;    if killed then release kill op;
c134:jl. w1     c133.  ;
     al  w2  x3+d18    ;    w2:=addr of progname;
     bl  w0  x3+d88    ;
     sz  w0     1<9    ;    if convert then
     jl. w3    (b72.)  ;      release access(prog name);
     rl. w3     b11.   ;
     ld  w1    -100    ;    restclaim:=0
     rs  w1  x3+d58    ;
     ds  w1  x3+d59    ;
     rs  w1  x3+d56    ;
     dl. w3     a8.    ;    goto finis;
     jl.       (b16.)  ;

     j79: 417          ;    finis
a8:  j82: 427          ;
\f


; pm 20.4.72                   boss 2, tpsjobstart, ...59...
; alarms

j111=k-b61             ;

     jl. w1     c133.  ;    banker kill;
     rl. w1    (b29.)  ;    page1 descr := page4 descr;
     rl  w0  x1+14     ;
     rs  w0  x1+8      ;
     dl. w3     a7.    ;    goto terminate;
     jl.       (b16.)  ;

c133:                  ; release kill op:
     rl. w3     b11.   ;    kill;
     ws. w1     b61.   ;
     rs  w1  x3        ;
a3:  rl  w2  x3+d91    ;
     jl. w3    (b31.)  ;    lock chain(psjob que);
     bl  w2  x1+3      ;
     ba. w2  x2+a0.    ;
     jl.     x2+a0.    ;    goto action(code);

a0=k-1, h.
     a1.     ; 1  tape ready
     a5.     ; 2  killed by user
     a6.     ; 3  killed by operator
     a4.     ; 4  answer
     a4.     ; 5  time up
     a2.     ; 6  internal
     a2.     ; 7  run
     a2.     ; 8  go
     a2.     ; 9  submit
     a2.     ; 10 convert
     a4.     ; 11 kit on
     a3.     ; 12 card job
     a3.     ; 13 tre job
     a3.     ; 14 trf job
     a3.     ; 15 replace operation
     a4.     ; 16 harderror swopin
w.


a2:  am         b35-b30;    open answer sem;
a1:                    ;
     rl. w3     b30.   ;      -    -     -  chained;
     rl  w2  x1+4      ;    w2:= answer sem;
     jl  w3  x3        ;
     rl. w3     b11.   ;
     jl.        a3.    ;    goto banker kill;

a4:  al  w0     0      ;    signal free;
     hs  w0  x1+2      ;
     rl. w3     b11.   ;
     jl.        a3.    ;    goto banker kill;
a6:  am         5      ;
a5:  al  w0     1      ;
     rl. w3     b11.   ;
     hs  w0  x3+d104   ;
     al  w0     0      ;
     hs  w0  x1+2      ;
\f


;pm 17.3.72                    boss 2, tpsjobstart, ...60...
;alarms
     rl  w1  x3        ;
     jl.     x1+b61.   ;
     j112:426          ;
a7:  j113:361          ;
e.
b. a15  w.              ;
a10:  <:accountjob not ok<0>:>

; request alarm:

c110=k-b61            ;

     bl  w0  x3+d104   ;    if killed then
     sn  w0     6      ;
     jl. w1     c133.  ;    release kill op;

     bl  w0  x3+d88    ;
; testing
sz  w0     1<3    ;    if online job then
c.-1, o34, z.     ;    (bossfault xref)
jd        -34     ;      bossfault 34
     sz  w0     1<6    ;    if not internal job then
     jl.        a0.    ;    begin
     so  w0     1<5    ;
     jl.        a9.    ;
     bl  w0  x3+d104   ;    if card job and
     sn  w0     5      ;    alarm = jobfile unreadable then
     jl.        a4.    ;    skip the request alarm;
a9:                    ;
     rl. w2     b47.   ;      lock request line free;
     jl. w3    (b31.)  ;

     bl  w3  x3+d104   ;      w3:= cause;
     ba. w3  x3+a1.    ;      w3:= text(cause);
     rl. w2  x3+a1.    ;      w2:= param(cause);
a2:  al  w1  x1+2      ;
     al  w3  x3+2      ;
     rl. w0  x3+a1.    ;
     rs  w0  x1+4      ;
     sz  w0     255    ;
     jl.        a2.    ;
     se  w2     1      ;      if w2 then
     jl.        a3.    ;
     rl. w3     b11.   ;      line:= text param;
     al  w2  x1+8      ;
     dl  w1  x3+14     ;
     ds  w1  x2+0      ;
     dl  w1  x3+18     ;
     ds  w1  x2+4      ;
     al  w1  x2        ;

a3:  al  w0  x1        ;
     rl. w1     b61.+4 ;
     ws  w0     2      ;
     al  w3     3      ;
     ds  w0  x1+4      ; 
     rl. w2     b48.   ;
     jl. w3    (b30.)  ;      opench(request que, print);
     jl.        a4.    ;    end else begin
\f


;pm 27.12.72                    boss 2, tpsjobstart, ...61...
;requestalarm

a0:  rl. w1    (b29.)  ;      page 3:= op;
     rl  w0  x3+d114   ;
     rs  w0  x1+12     ;
     sn  w0     0      ;    if answer is send then
     jl.        a4.    ;      goto answer send;
     jl. w3    (b1.)   ;      get page;

     rl. w1     b61.+6 ;
     rl  w2  x1+4      ;
     bl  w0  x3+d104   ;      answer:= cause;
     hs  w0  x1+2      ;
     jl. w3    (b35.)  ;      open answer;
                       ;    end;
a4:  rl. w1    (b29.)  ; answer send:
     rl  w0  x3+d0     ;    page 3:= job file;
     rs  w0  x1+12     ;
     jl. w3    (b1.)   ;    get page; 
     bl  w0  x3+d88    ;
     so  w0     1<8    ;    if offline job then
     jl.        a5.    ;    begin
     sz  w0     1<5    ;      if cardjob then
     jl. w1     c123.  ;        call empty cardreader;
     rl. w2     b4.    ;      lock catalog;
     jl. w3    (b36.)  ;

                       ;    end;
a5:  rl. w2     b61.+6 ;
j171=k+1
     al  w2  x2+218    ;
     al  w0  x2+8      ;
     rs. w0     b61.+6 ;
     jl. w3    (b72.)  ;    release access(job file);
     al  w0     0      ;
     rs. w0    (b61.+6);    name table address:=0;
     rl. w1    (b29.)  ;
     rs  w0  x1+12     ;    page 3 descr:=0;
     bl  w0  x3+d88    ;
     sn  w0     0      ; if started as replace job then
     jl.        a12.   ;    skip release of resources;
                       ; if offline job then
     so  w0     1<8    ;      begin
     jl.        a6.    ;

     dl. w1     b8.    ;      catalog base:= boss private;
     al  w3  x3+d105   ;
     jd         1<11+72;

     al  w3  x3+d100-d105;      remove job file;
     jd         1<11+48;

     rl. w2     b4.    ;      open catalog;
     jl. w3    (b35.)  ;

     bl  w0  x3+d88    ;
     sz  w0     1<5    ;      if card job then
     am         18     ;      release job card area else
     al  w0     5      ;      release job tape area;
     hs  w0  x3+d14+2  ;
     al  w1  x3+d14    ;
     rl. w2     b33.   ;
     jl. w3    (b30.)  ;
     rl  w2  x3+d82    ;
     jl. w3    (b36.)  ;      lock answer;

     bl  w1  x3+d88    ;
     so  w1     1<0    ;      if reader reserved then
     jl.        a6.    ;
     al  w1  x1-1<0    ;        release reader;
     hs  w1  x3+d88    ;
     rl. w0     b74.   ;
     rs  w0  x3+d87+2  ;
     bz  w0  x3+d131   ;
     rs  w0  x3+d87+6  ;
     al  w1  x3+d87    ;
     rl. w2     b33.   ; 
     jl. w3    (b30.)  ;
     rl  w2  x3+d82    ;      lock answer;
     jl. w3    (b36.)  ;    end;
\f


;pm 17.3.72                    boss 2,tpsjobstart, ...62...
;requestalarm

a6:  al  w1  x3+d14    ;    release all;
     al  w0     2      ;
     hs  w0  x1+2      ;
     al  w0     0      ;
     rs  w0  x1+4      ;
     rs  w0  x1+6      ;
     rl. w2     b33.   ;
     jl. w3    (b30.)  ;
     rl  w2  x3+d82    ;
     jl. w3    (b36.)  ;
a12: bl  w0  x3+d14+3  ;    if accountjob then
     se  w0     2      ;
     jl.        a11.   ;      begin

     rl. w2     b47.   ;
     jl. w3    (b31.)  ;      lock(request free);
     
     rs  w1  x3+d93    ;      save request line addr;
     al  w2  x1        ;
     dl. w1     a10.+2 ;      move
     ds  w1  x2+8      ;
     dl. w1     a10.+6 ;      <:accountjob not ok:>
     ds  w1  x2+12     ;
     dl. w1     a10.+10;      to request line
     ds  w1  x2+16     ;
     al  w1     12     ;      length of line
     al  w0      2     ;      insert line
     ds  w1  x2+4      ;
     al  w1  x2        ;
     rl. w2     b48.   ;
     jl. w3    (b30.)  ;     open(requestque,insert line);

     al  w0     20     ;
     hs  w0  x3+d14+2  ;      op.code:=activate;
     rl. w2     b33.   ;
     al  w1  x3+d14    ;
     jl. w3    (b30.)  ;      open(bankerque,wait activate);
     rl  w2  x3+d82    ;
     jl. w3    (b36.)  ;      lock(psjobbuf);

     rl  w1  x3+d93    ;      get request line addr;
     al  w0     1      ;
     rs  w0  x1+2      ;      remove line;
     rl  w0  x3+d82    ;
     rs  w0  x1+4      ;      answ sem:= psjob buf sem addr;
     rs  w1  x1+6      ;
     rl. w2     b48.   ;
     jl. w3    (b30.)  ;      open(request que, remove line);
     rl  w2  x3+d82    ;
     jl. w3    (b36.)  ;      lock(psjobbuf);
     rl. w1    (b29.)  ;
     rl  w0  x3+d0     ;      page 1 := jobfile page;
     rs  w0  x1+8      ;
     al  w0     0      ;
     rs  w0  x3+d93    ;

     rl. w2     a7.    ;
     al  w3     j83    ;      pagejump to accountjob entry;
     jl.       (b16.)  ;      end;

a11:
\f


; re 14.8.74                boss 2, tpsjobstart      ...63...

     al  w3     j36    ;
     rl. w2     a7.    ;
     jl. w1    (b16.)  ;

a7:  j81: 400          ;    start page


; set alarm claims:

c37=k-b61              ;

     bl  w2  x3+d88    ;

     ld  w1    -100    ;
     ds  w1  x3+d77    ;    conversational:=core lock time:=0;
     hs  w1  x3+d70    ;    tape table entries:= 0;
     rs  w1  x3+d62    ;    no of useable kits:= 0;
     rs  w1  x3+d58    ;    temp disc slices:= 0;
     ds  w1  x3+d59    ;    perm disc:= temp entries:= temp drum slices:= 0;
     rs  w1  x3+d56    ;    perm drum claim:= 0;
     ds  w1  x3+d43    ;    keys:= stations:= mounts:= tapes:= 0;
     ds  w1  x3+d47    ;    time:= size:= 0;
     ds  w1  x3+d30+2  ;    devices:= 0;
     ds  w1  x3+d45    ;    conv:= acc:= out:= susp:= 0;
     ds  w1  x3+d39    ;    buf:= area:= int:= func:= 0;
     al  w0     1      ;
     hs  w0  x3+d102   ;    mini:=yes;
     hs  w0  x3+d45    ;    outp:= 1;
     sz  w2     1<7    ;    if convert claim then
     hs  w0  x3+d68    ;    converts:= 1;
     ld  w1    -2      ; 
     rs  w1  x3+d66    ;    max wait:= 1<22;
     al  w0    -1      ;
     hs  w0  x3+d39    ;    internal:= -1;
b. a0 w.
     so  w2     1<8    ;    if offline job then begin
     jl.        a0.    ;
     sz  w2     1<5    ;      temp disc entries:=if cardjob
     am         i163-i162;      then jobcard area length
     al  w0     i162   ;        else jobtape area length
     rs  w0  x3+d58    ;
     al  w0     1      ;      temp entries:=1
c.i27, hs w0 x3+d59 z. ;
c.-i27,hs w0 x3+d58 z. ;
a0:
e.
\f


;pm 29.5.72                    boss 2, tjobstart, ...64...

; create alarm job:

c80=k-b61              ;

     bl  w1  x3+d88    ;    set error mode;
     la. w1     a8.    ;
     sz  w1     1<7    ;    if convert claim then
     al  w1  x1-1<7-1<4;    convert claim:= false else alarm mode:= true;
     al  w1  x1+1<4    ;
     hs  w1  x3+d88    ;
     jl.        c34+b61.;   goto create job;

a8:    -1-1<4-1<2-1<1  ;

a1:
e.                     ;
b. a10  h.             ;
; finis causes
;   0     1     2     3     4     5     6     7     8     9
   a0.,  a0.,  a0.,  a0.,  a0.,  a10., a1.,  a2.,  a3.,  a4.  ; 0
   a0.,  a5.,  a0.,  a0.,  a0.,  a0.,  a0.,  a0.,  a0.,  a0.  ; 10
   a0.,  a0.,  a0.,  a0.,  a0.,  a0.,  a0.,  a0.,  a0.,  a0.  ; 20
   a0.,  a0.,  a5.,  a0.,  a0.,  a0.,  a0.,  a0.,  a6.,  a7.  ; 30
   a8.,  a9.                                                  ; 40


w.
a0:   0, <:boss alarm<0>:>
a1:   0, <:killed by operator <0>:>
a2:   1, <:user index too large <0>:>
a3:   1, <:illegal identification <0>:>
a4:   1, <:user index conflict <0>:>
a5:   0, <:jobfile too long<0>:>
a6:   1, <:option unknown <0>:>
a7:   1, <:param at <0>:>
a8:   1, <:syntax at <0>:>
a9:   1, <:line too long after <0>:>
a10:  0, <:jobfile unreadable<0>:>


e.
i. e.                  ;b  names  codepage 4
g9=k-g10
\f


; re  14.8.74               boss 2, tpsjobstart       ...65...

; 5.  codepage

g11:                   ;    start of page

b. b80 w.

b61:            0,r.5  ;    page addresses
           15<12 + 0   ;    page ident:  codepage 5

b16: j200:      8      ;    page jump
b19:            10     ;    constant
b26: j201:      2      ;    send and wait fast
b28: j202:      25     ;    call
b29: j203:      26     ;    current coroutine descr
b30: j204:      6      ;    open chained
b31: j205:      5      ;    lock chained
b33: j206:      67     ;    banker queue
b35: j207:      4      ;    open
b36: j208:      3      ;    lock
b47: j209:      52     ;    request line free
b48: j210:      51     ;    request queue
b71: j211:      32     ;    prepare access
b72: j212:      33     ;    terminate access
     j213:      140    ; -2 virt rb procedures
b73: j214:      141    ;    rel lookup and reserve
b75: <:clock:>,0,0,0   ;    timer
b76: 0, 5              ;    timermessage
b77: j99:  1           ;    send and wait
b79:            5<12   ;    constant
b43:      <:tro:>, 0   ;    tape modes
          <:tre:>, 2   ;
          <:trn:>, 4   ;
          <:trf:>, 6   ;
b44:      <:crc:>, 10  ;    card modes
          <:crd:>, 8   ;
          <:crb:>, 0   ;
b42:                   ;    end modes


b41:      <:primout:>,0; name of online-job primary output area
j100:       56    ;    std reader operation semaphore;

\f


; re 14.8.74                      boss 2, tpsjobstart  ...66...


; page 4 = psjobdescr, x3 = page 4 addr.
; page 1 = page 4.
; load <mode> <name>

b. a60  w.             ;
a35=d11+8+8            ;    rel on job descr after second parameter
c62=k-b61              ;
     dl  w1  x3+2      ;    save return
     ds  w1  x3+d64    ;
     rl  w1  x3+d13    ;
     se  w1     c16    ;    if first load command then
     jl. w1     a29.   ;    call set claims;
c147=k-b61
     dl  w1  x3+d11+2  ;    w1:=mode;
     sn  w0     0      ;    if mode is an integer then
     jl.        a1.    ;    goto test card mode;
     jl.        a43.   ;      goto search modetable;

a43: dl  w1  x3+d11+2  ; search mode table:
     se  w1     0      ;    if mode is more than 3 letters then
     jl.        a34.   ;      goto not in mode table;

     al. w2     b43.   ;    w2:=ref first mode;
a2:  sn  w0 (x2)       ; rep: if this mode then
     jl.        a3.    ;      goto mode found;
     al  w2  x2+4      ;    w2:=ref next mode;
     se. w2     b42.   ;    if not end element then
     jl.        a2.    ;      goto rep;
a34: al  w1     10     ;
     rs  w1  x3+a35+r3 ;    set mode,kind
     dl  w1  x3+d122   ;
     ds  w1  x3+a35+r2+2;   set host description
     se  w0     0      ;    if rbjob then
     jl.        a44.   ;      goto nonstd mode found;

a18: dl  w3  x3+d64    ; parameter error:
     al  w3  x3+4      ;
     jl.       (b16.)  ;    goto return + 4;

a1:  sz  w1     2      ; test card mode:
     sz  w1     8      ;    if (bit 1 & -, bit 3) ! bit 0 !
     sz  w1 -1<8+1<6+1 ;    mode > 128 or mode = 64 then
     jl.        a18.   ;    goto parameter error;
\f


; re 75.06.24                  boss 2, tpsjobstart   ...66a...


a4:  bl  w0  x3+d88    ; test card job:
     so  w0     1<5    ;    if not card job
     jl.        a18.   ;    then goto parameter error;
     rs  w1  x3+d11+2  ;    save mode;
     bl  w1  x3+d116   ;    card file no:= card file no + 1;
     al  w1  x1+1      ;
     hs  w1  x3+d116   ;
     rl  w0  x3+d118   ;    if card file no = card file count
     sn  w0  x1        ;
     jl.        c100.  ;    card exhausted;
     jl.        a5.    ;

;  procedures for call of rb procedures
a42: rl. w1     b73.   ; lookup and reserve:
     ws. w2     b61.   ;    save rel rb entry
     ds  w2  x3+2      ;      and rel return;

     dl  w1  x3+d11+2  ;
     ds  w1  x3+a35+r1+2;     move name;
     dl  w1  x3+d11+6  ;
     ds  w1  x3+a35+r1+6;
     dl  w1  x3+d26    ;    set catalog base = project base
     ds  w1  x3+a35+r6+2;

     rl. w2    (b29.)  ;
     rl  w1  x2+8      ;
     al  w1  x1+a35    ;    page1:=page1+a35;
     rs  w1  x2+8      ;
     al  w1  x3+a35    ;
     rs. w1     b61.+2 ;

     rl. w2     b73.-2 ;  
     rl  w3  x3        ;
     jl. w1    (b28.)  ;    call rb procedure;
     am        -1      ; +2: not ok
     al  w1     0      ; +4: ok

     rl. w2    (b29.)  ;
     rl  w0  x2+14     ;
     rs  w0  x2+8      ;    page1:=page4(=page1-a35);
     rl. w3     b61.+8 ;
     rs. w3     b61.+2 ;

     am     (x3+2)     ;
     jl.        b61.   ;    return;

; procedure set reader device no
;
; if another reader is reserved already then release it
;
;          call                 return
;w0       irrelevant           destroyed
; w1       device no            destroyed
; w2       irrelevant           destroyed
; w3       return               abs page 1

   
a47: ws. w3     b61.   ;    w3:=rel return
     al  w2  x3        ;
     rl. w3     b61.+2 ;    w3:=page 1 abs
     rs  w2  x3+d144   ;    save rel return
     bz  w2  x3+d131   ;    w2:=old device no
     hs  w1  x3+d131   ;    set new device no
     bl  w0  x3+d88    ;
     so  w0     1      ;    if reader reserved and
     jl.        a55.   ;
     sn  w2  x1        ;    old reader<>new reader then
     jl.        a48.   ;    begin
     al  w0     4      ;
     hs  w0  x3+d87+2  ;      opcode:=release reader
     rs  w2  x3+d87+6  ;      device:=reserved reader device no
     al  w1  x3+d87    ;      w1:=abs ref operation
     rl. w2     b33.   ;
     jl. w3    (b30.)  ;      open(banker queue,release reader)
     rl  w2  x3+d82    ;
     jl. w3    (b36.)  ;      lock(psjob buf)
     bl  w2  x3+d88    ;
     al  w2  x2-1      ;      clear reader reserved bit
     hs  w2  x3+d88    ;
     bz  w0  x3+d131   ;
     sn  w0     0      ;      if new reader = std reader then
     jl.        a18.   ;      goto alarm
     rl  w0  x3+d87+6  ;
     se  w0     0      ;    if old reader = std reader then
     jl.        a48.   ;      begin
a56: al  w1  x3+d14    ;
     al  w0     31     ;
     hs  w0  x1+2      ;        opcode := unclaim std reader
     rl. w2     b33.   ;
     jl. w3    (b30.)  ;        open(banker queue,unclaim std reader)
     rl  w2  x3+d82    ;
     jl. w3    (b36.)  ;        lock(psjob buf);
     jl.        a48.   ;      end
a55:                   ;    end else
     bz  w0  x3+d131   ;    begin
     se  w0     0      ;      if new reader = rb reader
     jl.        a56.   ;      then goto unclaim std reader
a48: am     (x3+d144  );    end
     jl.        b61.   ;    return

\f


; re 75.06.24                  boss 2, tpsjobstart   ...66b...

a0=k-b61               ; job tape entry:
     rl  w2  x3+d11+2  ;    w2:=mode;
     al  w1     10     ;
     hs  w2     2      ;    w1:=mode kind;
     rs  w1  x3+a35+r4 ;    set mode,kind
     dl  w1  x3+d122   ;    set host description
     ds  w1  x3+a35+r2+2;
     rs  w0  x3+d14+4  ;
     rl. w1     j100.  ;    w1:=std reader operation sem;
     se  w0     0      ;    if host ident<>0 then
     al  w1  x1+e13    ;    w1:=rb reader operation sem;
     hs  w0  x3+d131   ;********** device=0 - removed at new job command
     rs  w1  x3+d141+4 ;    set reader operation sem in reader table;

     am      x2        ;
     rl. w0  x2+b43.   ;    mode name:=
     al  w1     0      ;      mode name(mode);
     ds  w1  x3+d11+2  ;    
     al  w0     0      ;
     ds  w1  x3+d11+6  ;
     jl.        a46.   ;    goto test rb reader;

a3:  rl  w1  x2+2      ; mode found:
     sl. w2     b44.   ;    if card mode then
     jl.        a4.    ;      goto test card job;
     rs  w1  x3+a35+10 ;    save mode
     al  w1     0      ;    reader:=std ************changed at new load command
     jl. w3     a47.   ;    set reader device no
     al  w0     0      ;    host id:=0
     rl  w2  x3+a35+10 ;    w2:=mode
a44: rs  w0  x3+d14+4  ; nonstd mode found: (w0=host ident);
     rl. w1     j100.  ;    w1:=std reader operation sem;
     se  w0     0      ;    if host ident <>   then
     al  w1  x1+e13    ;    w1:=rb reader operation  sem;
     rs  w1  x3+d141+4 ;    set reader  operation sem in reader table;

     bl  w1  x3+d92    ;
     al  w1  x1+1      ;    tape count:=tape count+1;
     hs  w1  x3+d92    ;

     am         127-1  ;
a46: al  w0     1      ; test rb reader:
     rs  w0  x3+a35+r5 ;    time out:=if jobtape then 1 else 127;
     rs  w2  x3+a35+10 ;    save mode in case of std reader

     rl  w0  x3+d14+4  ;    if std reader then
     sn  w0     0      ;      goto reserve reader;
     jl.        a7.    ;
     rl  w0  x3+d146   ;    set abs ref message area
     rs  w0  x3+a35+r0 ;
     dl  w1  x3+d122   ;    set host description
     ds  w1  x3+a35+r2+2;

     jl. w2     a42.   ;    lookup and reserve;
     rl  w0  x3+a35+r100;    w0:=result or name table addr;
     sh  w0    (72)    ;    if w0 not name table address then
     jl.        a18.   ;      parameter error
     sl  w1     0      ;    if subprocess reserved (by boss) then
     jl.        a49.   ;    begin
     al. w1     b76.   ;      w1:=message
     al. w2     b75.   ;      w2:=name
     jl. w3    (b77.)  ;      send and wait timermessage
     jl.        a46.-2 ;      try reservation once again
a49:                   ;    end
     dl  w2  x3+a35+8  ;    w1w2:=deviceno,rckind
     se  w2     10     ;      or rckind<>reader then
     jl.        a18.   ;        goto parameter error;
     jl. w3     a47.   ;    set reader device no


\f


; pm 3.2.72                    boss 2, tpsjobstart, ...67...

a7:  bl  w1  x3+d88    ; reserve reader:
     sz  w1     1      ;    if reader reserved then
     jl.        a6.    ;      goto request for load;
     al  w0     3      ;
     hs  w0  x3+d14+2  ;    opcode:=reserve reader;
     bz  w1  x3+d131   ;
     rs  w1  x3+d14+6  ;    set host  ident, device no in operation;
     al  w1  x3+d14    ;    w1:=operation;
     rl. w2     b33.   ;
     jl. w3    (b30.)  ;    open(banker queue,reserve reader);
     rl  w2  x3+d82    ;
     jl. w3    (b36.)  ;    lock(psjob buf);
     bl  w0  x3+d14+2  ;
     se  w0     3      ;
     jl.        c35.   ;    job killed;
     al  w0     1      ;    jobstate.reader reserved:=true
     ba  w0  x3+d88    ;
     hs  w0  x3+d88    ;

a6:  rl. w2     b47.   ;    lock(request line free);
     jl. w3    (b31.)  ;
a39=32                 ;    length of text if jobfile
a40=48                 ;    length of text if not jobfile
c.6+a40+4-e10-1, m.*** e10 too small
z.
c.6+a39+4-e10-1, m.*** e10 too small
z.

     al  w2  x1        ;    w2:=line buffer addr;
     ld  w1    -100    ;    set empty text (12*null)
     ds  w1  x2+8      ;
     ds  w1  x2+12     ;
     dl. w1     a11.   ;    <:load :>
     ds  w1  x2+16     ;
     bz  w1  x3+d131   ;    w1:=device no
     ls  w1     1      ;
     wa  w1     74     ;    w1:=name table address
     rl  w3  x1        ;    w3:=process description address
     dl  w1  x3+4      ;    move device name
     ds  w1  x2+20     ;
     dl  w1  x3+8      ;
     lo. w1     a17.   ;
     ds  w1  x2+24     ;
     rl. w3     b61.+2 ;    reestablish w3
     dl  w1  x3+d11+2  ;
     ds  w1  x2+28     ;
     dl  w1  x3+d11+6  ;    mode name;
     lo. w1     a17.   ;
     ds  w1  x2+32     ;
     dl. w1     a15.   ;
     ds  w1  x2+36     ;    <: job:>
     rl. w1     a45.   ;
     rs  w1  x2+38     ;    <:<13><10><127>:>
     rs  w1  x2+54     ;

     bz  w0  x3+d92    ;    w0:=tape number
     sn  w0     0      ;    if job tape then
     jl.        a12.   ;     goto a12
     jl. w1     a27.   ;    w1:=tape number in text form
     rs  w1  x2+42     ;
     al  w1     32     ;
     rs  w1  x2+44     ;    space
     dl  w1  x3+d19+2  ;    move job name
     ds  w1  x2+36     ;
     dl  w1  x3+d19+6  ;
     lo. w0     a17.   ;
     ds  w1  x2+40     ;
     dl  w1  x3+d11+10 ;    move area name
     ds  w1  x2+48     ;
     dl  w1  x3+d11+14 ;
     ds  w1  x2+52     ;


\f



; sm 75.06.02                   boss 2, tpsjobstart   ...68...


     am         a40-a39;
a12: al  w0     a39    ;    w0:=length of text
     rs  w0  x2+4      ;
     rl  w0  x3+a35+10 ;    get mode for send operation;
     rs  w0  x3+d11+2  ;
     rl  w1  x3+a35+12 ;
     rl  w0  x3+a35+4  ;
     ds  w1  x2+e10-2  ;
     se  w0     0      ;
     am         1<2-1<3;
a14: al  w0     1<3+1<1;    operation code;
     rs  w0  x2+2      ;
     al  w1  x2        ;    w1:= buffer addr;
     rl. w2    (b29.)  ;    request line:= virtual buf addr;
     rl  w0  x2+10     ;
     rs  w0  x3+d93    ;
     bz  w1  x3+d131   ;    w1:= reader device number
     ds  w1  x3+d87+14 ;
     am         0-2    ;
a5: c29=k-b61          ; card entry:
    c30=a0-c29         ; define job tape entry relative to card entry.
     al  w0     2      ;    w0:=tape- or card-reader  (0 or 2);
     se  w0     2      ;
     am         d141-d118;   w1:=rel base of tape reader table;
     al  w1     d118   ;    w1:=rel base of card reader table;
     ds  w1  x3+d11+6  ;

; send operation to psreader
     al  w0     1      ;    op.code:= 1;
     rs  w0  x3+d87+2  ;
     rl  w1  x3+d11+2  ;    op.mode:= mode;
     rs  w1  x3+d87+6  ;
     rl. w1    (b29.)  ;
     rl  w1  x1+8      ;
     wa  w1  x3+d11+6  ;    w1:=virt addr of reader  table (on  job  
                       ;                             descr  page);
     rs  w1  x3+d87+10 ;
     al  w1  x3+d87    ;    w1:= op;
     jl. w2     a36.   ;    w2:=abs base of reader table;
     rl  w2  x2+4      ;    w2:=reader queue sem;
     jl. w3    (b30.)  ;    open op(reader que);
     rl  w2  x3+d82    ;
     jl. w3    (b36.)  ;    lock(psjob buf);
     rl  w0  x3+d11+4  ;    if tape reader then
     sn  w0     0      ;      ignore the answer;
     jl.        a38.   ;
     rl  w0  x3+d87+2  ;    w0:=answer;
     se  w0     0      ;    if answer not ok then
     jl.        a37.   ;      goto mode unknown;
a38:
\f


; re  14.8.74                    boss 2, tpsjobstart  ...69...

; create area

; check for area in use
     al  w0     0      ;    mess.segm := 0;
     rs  w0  x3+d86    ;
     dl  w1  x3+d11+8+2;    if area name = <:primout:>
     sn. w0    (b41.)  ;
     se. w1    (b41.+2);
     jl.        a28.   ;
     dl  w1  x3+d11+8+6;
     sn. w0    (b41.+4);
     se. w1    (b41.+6);
     jl.        a28.   ;
     bl  w0  x3+d88    ;      and online then
     sz  w0     1<3    ;
     jl.        a26.   ;        goto alarm;
a28:
     dl  w1  x3+d24    ;    w0w1 := interval;
     al  w2  x3+d11+8  ;    w2 := name address;
     jl. w3    (b71.)  ;    prepare access;
     al  w2     1      ;+2  if not found then entry access count := 1;
     sn  w0 (x3+d24-2) ;+4  if interval of entry found <> login interval then
     se  w1 (x3+d24)   ;
     al  w2     1      ;      access count := 1;
     rs  w2  x3+d86    ;    save access count;
     al  w2  x3+d11+8  ;    w2 := name address;
     jl. w3    (b72.)  ;    terminate access;
     al  w0     0      ;    mess.segment := 0;
     rx  w0  x3+d86    ;    restore access count;
     se  w0     1      ;    if entry in use then
     jl.        a26.   ;      goto alarm;
     jl. w1     a30.   ;    call catproc(create);
     jl.        a8.    ;+2  if not created then goto alarm;
c148=k-b61

     rl. w0     b79.   ;+4  mess.op:= output;
     rs  w0  x3+d89    ;
     jl. w2     a36.   ;    w2:=abs base of reader table;
     rl  w2  x2+8      ;    page 3:=top of buffer;
     rl. w1    (b29.)  ;
     rs  w2  x1+12     ;
\f


;pm 8.2.72                    boss 2, tpsjobstart, ...70...


a10: jl. w2     a36.   ; next block:
     al  w3  x2        ;    w3:=abs base of reader table;
     rl. w1    (b29.)  ;
     rl  w2  x1+12     ;    page 3:= if page 3 + 512 >= top of buf then
     al  w2  x2+512    ;    first of buf else
     sl  w2 (x3+8)     ;   page 3 + 512;
     rl  w2  x3+6      ;
     rs  w2  x1+12     ;
     rl  w2  x3+12     ;    lock(reader full);
     jl. w3    (b36.)  ;
     al  w1     0      ;

     rx  w1  x3+d93    ;    if request line pending then
     sn  w1     0      ;
     jl.        a16.   ;    begin
     rs  w1  x3+d87+6  ;      op.line:= line virt;
     al  w0     1      ;
     rs  w0  x3+d87+2  ;      op.code:= release;
     al  w1  x3+d87    ;      w1:= op;
     rl. w2     b48.   ;      open op(request que);
     jl. w3    (b30.)  ;

     rl  w2  x3+d82    ;      lock(psjob buf);
     jl. w3    (b36.)  ;    end;
a16: rl. w1     b61.+6 ;    mess.first:= page 3 abs;
     al  w2  x1+510    ;    mess.last:= page 3 abs + 510;
     ds  w2  x3+d89+4  ;    w1:= mess addr;
     al  w1  x3+d89    ;    w2:= name addr;
     al  w2  x3+d11+8  ;
     jl. w3    (b26.)  ;    send and wait fast;

     jl. w2     a36.   ;    w2:=abs base of reader table;
     rl  w2  x2+10     ;    open(reader free);
     jl. w3    (b35.)  ;

     rl  w1  x3+d86    ;    mess.segment:= mess.segment + 1;
     al  w1  x1+1      ;
     rs  w1  x3+d86    ;
     jl. w2     a36.   ;    w2:=abs base of reader table;
     rl  w0  x2+2      ;    w0:=segment count;
     rl  w2  x3+d11+4  ;    if tape reader then
     sn  w2     0      ;      (w0=addr of segment count)
     rl  w0    (0)     ;      w0:=segment count;
     sn  w0  x1        ;    if w0 = mess.segment then
     jl.        a9.    ;    goto remove area proc and return;

     rl  w1  x3+d15    ;    if mess.segment <> area size
     se  w1 (x3+d86)   ;    then
     jl.        a10.   ;    goto next block;
     jl. w1     a31.   ;    call cat proc(increase entry)
     jl.        a8.    ;+2  if ok then goto next block;
c149=k-b61
     jl.        a10.   ;+4  else goto test card or tape

\f



; sm 75.06.02                   boss 2, tpsjobstart, ...70a...



a9:  dl  w1  x3+d24    ; remove area proc:
     al  w3  x3+d105   ;  
     jd         1<11+72;
     al  w3  x3+d11+8-d105;
     jd         1<11+64;
     dl  w3  x3+d64-d11-8; return:
     jl.       (b16.)  ;

a11=k+2, <:load :>
a13:     <:  0:>
a15=k+2, <: job:>
a17:     <:<0><0><32>:>
a45:     <:<13><10><127>:>
a51:     0             ;
a52:     48-32         ;  zero-space


;    convert no to text form
;    call: w0=no, w1=return
;    return: w1=no on text form
a27: rs  w1  x2+e10-2  ;    save return
     ld  w1    -24     ;    w0w1:=number
     wd. w1     b19.   ;    w0:=n mod ; w1:=n // 10;
     rs. w0     a51.   ;    save least significant digit
     al  w0     0      ;
     wd. w1     b19.   ;    w0:=(n div 10) mod 10, w1:=(n div 100)
     sn  w1     0      ;    if w1<>0 then
     jl.        a53.   ;    begin
     wa. w0     a52.   ;      w0:=digit
     wa. w1     a52.   ;      w1:=digit
     jl.        a54.   ;    end else
a53: se  w0     0      ;    if w0<>0 then
     wa. w0     a52.   ;      w0:=digit
a54: rx  w1     0      ;    exchange first two digits
     ls  w1     16     ;
     ld  w1    -8      ;
     wa. w1     a51.   ;
     wa. w1     a13.   ;    add <: 00:>;
     jl     (x2+e10-2) ;    return;



a8:  rl  w0  x3        ;    w0 := return param from cat proc;
     sn  w0     1      ;    if killed then
     jl.        a22.   ;    begin
     rl  w0  x3+d86    ;
     sn  w0     0      ;      if mess.segment <> 0 then
     jl.        a23.   ;
     jl. w1     a32.   ;      call catproc(remove entry);
c.-1, o14, z.          ;    (bossfault xref)
     jd        -14     ;+2
c150=k-b61             ;+4
a23: am         6-26   ; cause 6 :   killed
a26: am         26-7   ; cause 26:   load area in use
a37: am         7-32   ; cause 7 :   mode unknown
a22: al  w0     32     ; cause 32:   temp exceeded
     hs  w0  x3+d104   ;

\f



; sm 75.06.02                   boss2, tpsjobstart, ...71...


     al. w1     a21.   ;    if reader not reserved then
     bl  w0  x3+d88    ;
     dl. w3     a25.   ;
     so  w0     1      ;
     jl.       (b28.)  ;    empty card reader
                       ;    else begin
     rl. w3     b61.+2 ;    w3:=page 1 abs
a20: rl  w2  x3+d141+12; rep:
     jl. w3    (b36.)  ;    lock(reader full);
     al  w1     0      ;    release request;
     rx  w1  x3+d93    ;
     sn  w1     0      ;
     jl.        a24.   ;
     rs  w1  x3+d87+6  ;
     al  w0     1      ;
     rs  w0  x3+d87+2  ;
     al  w1  x3+d87    ;
     rl. w2     b48.   ;
     jl. w3    (b30.)  ;    open chained(request queue);
     rl  w2  x3+d82    ;
     jl. w3    (b36.)  ;    lock psjob buf;
a24:                   ;
     rl  w2  x3+d141+10;
     jl. w3    (b35.)  ;    open(reader free);
     rl  w2  x3+d86    ;    segment:= segment + 1;
     al  w2  x2+1      ;
     rs  w2  x3+d86    ;
     rl  w0 (x3+d141+2);    if segment <> segm count  then
     se  w0  x2        ;    goto rep;
     jl.        a20.   ;    end;
a21: rl  w0  x3+d13    ;    if claims set then
     sn  w0     c16    ;
     jl.        c116.  ;    goto create alarm job;
     jl.        c102.  ;    goto request alarm;

a29: am         c137-c144;    set claims
a30: am         c144-c145;    cat proc
a31: am         c145-c146;     -    -
a32: al  w3     c146   ;       -    -
     rl. w2     j197.  ;
     jl.       (b16.)  ;    page jump to code page 2

j197:     451          ;    virt codepage 2
j177:     471          ;    virt empty card reader: code page 5
a25:      c55          ;
\f


; re 14.8.74                    boss 2, tpsjobstart   ...72...
; empty card reader:

b. a2  w.              ;

c40=k-b61              ;
a0:  bl  w1  x3+d116   ; next file:   card file no:= card file no + 1;
     al  w1  x1+1      ;
     hs  w1  x3+d116   ;
     rl  w0  x3+d118   ;
     sh  w0    -1      ;    w0:= if ---job reached then card file count
     al  w0  x1+1      ;      else cardfile no + 1;
     sh  w0  x1        ;    if card file count <= card file no
     jl.        a2.    ;    then goto exit;
     al  w0     1      ;
     rs  w0  x3+d87+2  ;    op.code:= boss controlled input;
     al  w0     0      ;
     rs  w0  x3+d86    ;    segment no:= 0;
     al  w0     i118   ;
     rs  w0  x3+d87+6  ;    mode:= std mode;
     rl. w1    (b29.)  ;
     rl  w1  x1+8      ;
     al  w1  x1+d118   ;    w1:= virt addr of card file count;
     rs  w1  x3+d87+10 ;    operation.10:= w1;
     al  w1  x3+d87    ;
     rl  w2  x3+d118+4 ;
     jl. w3    (b30.)  ;    open op(card reader que);
     rl  w2  x3+d82    ;
     jl. w3    (b36.)  ;    lock(psjob buf);

c55=k-b61              ;
a1:  rl  w2  x3+d118+12; rep:   lock(card reader full);
     jl. w3    (b36.)  ;
     rl  w2  x3+d118+10;
     jl. w3    (b35.)  ;    open(card reader free);

     rl  w2  x3+d86    ;    segment no:= segment no + 1;
     al  w2  x2+1      ;
     rs  w2  x3+d86    ;
     rl  w0  x3+d118+2 ;    if segment no = segment count
     sn  w0  x2        ;
     jl.        a0.    ;    then goto next file;
     jl.        a1.    ;    goto rep;

a2:  dl  w3  x3+2      ; exit:   return;
     jl.       (b16.)  ;
e.                     ;
\f


; re  19.8.74                     boss 2, tpsjobstart  ...73...

; procedure get abs base of reader table:
;    the position of the actual reader table is defined by:
;      d11+6:  rel of base of table on job descr page

                0      ;    saved return
a36: rs. w2     a36.-2 ;    save return;
     am     (x3+d11+6) ;
     al  w2  x3+0      ;    w2:=abs on job descr page;
     jl.       (a36.-2);    return;

e.


; alarms from codepage 5

b. a3 w.

c102:al  w3     c110   ;    goto request alarm;
     jl.        a1.    ;

c35: am        -30     ; cause  6:  killed
c100:al  w0     36     ; cause 36:  card exhausted
     hs  w0  x3+d104   ;    save cause
     rl. w1    (b29.)  ;
     rl  w2  x1+14     ;    page 1+=page 4 (=job descr page)
     rs  w2  x1+8      ;
c116:al  w3     c80    ;    goto create alarm job
a1:  rl. w2     j199.  ;
     jl.       (b16.)  ;

j199:           473    ;    alarm page

e.

i.
e.   ;  end b names  codepage 5
g12=k-g11
i. e.                  ; d names
i. e.                  ; c names
a2=j75

; j. code to move device table into code.
a1:  rl. w2     a4.    ;

     al  w1    -2047   ;
a0:  bl. w0  x2        ;
     hs. w0  x1+a2.+2047;
     al  w1  x1+1      ;
     al  w2  x2+1      ;
     se  w1     e17-2047;
     jl.        a0.    ;
     al  w0     0      ;    normal exit to slang;
     al  w2     0      ;
     jl      x3        ;

a4:  e24-a3-4+10000-a0 ;

     jl.        a1.    ;
j.
h0=s0,h1=s1            ;  final check sums
i. e.                  ; b, f, g, j names
e. e.                  ; e, i names, end tjobstart
\f

▶EOF◀