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

⟦3f69c4918⟧ TextFile

    Length: 48384 (0xbd00)
    Types: TextFile
    Names: »plotman«

Derivation

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

TextFile

stem name (maybe wrk-name):
            r3.  ;      overlap:  result 3;
            r3.  ;      exact  :  result 3;
     m101        ;    move name.work to name.sender (in case of wrk-name);
     m151        ;    create internal process;
     m150        ;    set name and interval;
     j0          ;    result ok;



; start internal process
;
; call:
;   w3.sender :  name address
;
; return:
;   w0.sender :  result = 0 : internal process started
;              ( result = 2 : state of process does not permit start )
;                result = 3 : process does not exist
;                result = 3 : process is not an internal process
;                result = 3 : process is not a child of calling process
;                result = 6 : nameformat illegal

p29:             ; start internal process:
     m65         ;    move catbase,name to work;
     m152        ;    start internal process;



; stop internal process
;
; call:
;   w3.sender :  name address
;
; return:
;   w0.sender :  result = 0 : stop initiated
;                result = 3 : process does not exist
;                result = 3 : process is not an internal process
;                result = 3 : process is not a child of calling process
;                result = 6 : nameformat illegal
;   w2.sender :  buffer address (in case result=0)

p30:             ; stop internal process:
     m65         ;    move catbase,name to work;
     m153        ;    stop internal process;



; modify internal process
;
; call:
;   w1.sender :  register address
;   w3.sender :  name address
;
; return:
;   w0.sender :  result = 0 : internal process modified
;              ( result = 2 : state of process does not permit modification )
;                result = 2 : child ic outside child process
;                result = 3 : process does not exist
;                result = 3 : process in not an internal process
;                result = 3 : process is not a child of calling process
;                result = 6 : nameformat illegal

p31:             ; modify internal process:
     m65         ;    move catbase,name to work;
     m154        ;    modify internal process;



; remove process
;
; call:
;   w3.sender :  name address
;
; return:
;   w0.sender :  result = 0 : process removed
;                result = 1 : function forbidden in calling process
;                result = 2 : state of process does not permit removal
;                result = 2 : calling process is not a user of process
;                result = 2 : claimed message to pseudo process
;                result = 3 : process does not exist
;                result = 3 : process is not a child of calling process
;                result = 5 : peripheral process reserved by another user
;                result = 6 : nameformat illegal

p32:             ; remove process:
     m65         ;    move catbase,name to work;
     m155        ;    remove process;



; generate name
;
; call:
;   w3.sender :  name address
;
; return:
;   w0.sender :  result = 0 : wrk-name generated
;                result = 2 : catalog io-error

p34:             ; generate name:
     m16         ;    generate wrk-name:
           r7.   ;      (irrell)
           r7.   ;      (irrell)
     m101        ;    move name.work to name.sender;
     j0          ;    result ok;



; copy
;
; call:
;   w1.sender :  first address
;   w2.sender :  buffer address
;   w3.sender :  last address
;
; return:
;   w0.sender :  result = 0 : area copied
;                result = 2 : sender of buffer is stopped
;                result = 3 : buffer describes input or output
;                               outside senders area
;                result = 3 : message regretted
;                result = 3 : operation in buffer is neither input not output
;   w1.sender :  bytes moved (if result=0)
;   w3.sender :  characters moved (if result=0)

p35:             ; copy:
     m156        ;    copy message;



; set catalog base
;
; call:
;   w0.sender :  lower base
;   w1.sender :  upper base
;   w3.sender :  name address
;
; return:
;   w0.sender :  result = 0 : catalog base set
;              ( result = 2 : state of process does not permit modification )
;                result = 3 : process does not exist
;                result = 3 : process is not an internal process
;                result = 3 : process is not a child of calling process
;                result = 4 : newbase illegal
;                result = 6 : nameformat illegal

p36:             ; set catalog base:
     m65        ;    move catbase,name to work;
     m71         ;    test new base;
     m74         ;    set catbase of internal;
     j0          ;    result ok;



; set entry base
;
; call:
;   w0.sender :  lower base
;   w1.sender :  upper base
;   w3.sender :  name address
;
; return:
;   w0.sender :  result = 0 : entry interval set
;                result = 2 : catalog io-error
;                result = 2 : document not ready
;                result = 3 : entry not found
;                result = 3 : name overlap (at new base)
;                result = 3 : name already exists (at new base)
;                result = 4 : entry protected against calling process
;                               (i.e. oldbase.entry outside maxbase.sender)
;                result = 4 : key,newbase combination illegal
;                result = 5 : entry used by another process
;                result = 6 : nameformat illegal
;                result = 7 : maincat not present

b. g10 h.

p37:             ; set entry base:
     m0  , r7.   ;    if no maincat then result 7;
     m65         ;    move catbase,name to work;
     m11 , a53   ;    search best entry and test modif allowed (no users)
     m36 , t3    ;    search chain (state = ready);
     m71         ;    test new base;
     m72         ;    save oldbase, base.work := newbase;
           r0.   ;      same base:  result ok;
     m75         ;    test base.work,key.work combination;
           r4.   ;      error:  result 4;
     m17         ;    test new system name (wrk-name not allowed):
           r3.   ;      overlap:  result 3;
           r3.   ;      exact  :  result 3;
     m56         ;    modify cur entry;
     m48         ;    if areaprocess then reinit area process;
     m77 , r0.   ;    if key.work < min aux key then result ok;

     m4          ;    set aux cat;
     m18         ;    test new catalog name:
           g6.   ;      overlap:  goto repair maincat;
           g8.   ;      exact  :  goto remove superfluous entry;
g0:              ; find old entry in auxcat:
     m73         ;    restore oldbase;
     m18         ;    test new catalog name:
           g1.   ;      overlap:  goto create new;  (does'nt matter)
           g2.   ;      exact  :  goto copy;
; the entry did not exist in the auxcat
g1:              ; create new:
     m55         ;    find empty entry;
           g5.   ;      no room:  goto repair maincat;
     m60         ;    clear access counters.work;
     m125, g3.   ;    goto modify;
g2:              ; copy:
     m64         ;    move statarea.entry to statarea.work;
g3:              ; modify:
     m71         ;    (test and) get new base;
     m72         ;    save oldbase, set newbase;
           r7.   ;      (same base:  not possible)
     m56         ;    modify cur entry;
     m88,  g4.   ;    if size.work>=0 then
     m62         ;      update and insert statarea;
g4:              ;
     m5          ;    set maincat;
     j0          ;    result ok;

g5:              ; repair maincat:
     m71         ;    (test and) get new base;
     m72         ;    save oldbase, set newbase;
           r7.   ;      (same base:  not possible)
g6:              ; (newbase set):
     m5          ;    set maincat;
     m18         ;    test new catalog name:
           r7.   ;      overlap:  result 7;  (not possible)
           g7.   ;      exact  :  goto change main entry;
     j7          ;    result 7;  (not possible)

g7:              ; change main entry:
     m73         ;    restore oldbase;
     m56         ;    modify cur entry;
     j3          ;    result 3;

g8:              ; remove superfluous entry:
     m57         ;    delete cur entry;
     m125, g0.   ;    goto find old entry in auxcat;

e.               ;



; set backing storage claims
;
; call:
;   w1.sender :  claim list address
;   w2.sender :  docname address
;   w3.sender :  name address
;
; result:
;   w0.sender :  result = 0 : backing starage claims set
;                result = 1 : claims exceeded (at calling process)
;                result = 1 : claims exceeded (at child)
;                result = 2 : document not found
;                result = 3 : process does not exist
;                result = 3 : process is not an internal process
;                result = 3 : process is not a child of calling process
;                result = 6 : nameformat (of docname) illegal
;                result = 6 : nameformat (of childname) illegal

p39:             ; set bs claims:
     m104        ;    move docname.sender to docname.work;
     m84         ;    (size.work := 0);
     m36 , t29   ;    search chain (state = allowed for set bs claims);
     m65         ;    move catbase,name to work;
     m32         ;    set bs claims;



; create pseudo process
;
; call:
;   w3.sender :  name address
;
; return:
;   w0.sender :  result = 0 : pseudo process created
;                result = 1 : (area) claims exceeded
;                result = 2 : catalog io-error
;                result = 3 : name overlap
;                result = 3 : name already exists
;                result = 6 : nameformat illegal

p40:             ; create pseudo process:
     m65         ;    move catbase,name to work;
     m15         ;    test new system name (maybe wrk-name):
           r3.   ;      overlap:  result 3;
           r3.   ;      exact  :  result 3;
     m101        ;    move name.work to name.sender (in case of wrk-name);
     m158        ;    create pseudo process;
     m150        ;    set name and interval;
     j0          ;    result ok;

; general copy
;
; call:
;   w1.sender:  parameter address
;   w2.sender:  buffer address
;
; return:
;   w0.sender:  result = 0 : area copied
;               result - 2 : sender of buffer stopped
;               result = 3 : message regretted
;               result = 3 : illegal addresses in buffer
;               result = 3 : operation in buffer not odd

p42:            ; general copy:
     m157       ;



; prepare backing storage
;
; call:
;   w3.sender :  chainhead address
;
; return:
;   w0.sender :  result = 0 : chaintable allocated
;                result = 1 : function forbidden in calling process
;                result = 1 : area claims exceeded
;                result = 2 : catalog io-error
;                result = 3 : auxcat name overlap
;                result = 3 : auxcat name already exists
;                result = 4 : document-device does not exist
;                result = 4 : device is not a bs-device
;                result = 4 : device not reserved by calling process
;                result = 5 : auxcat size <= 0  or  auxcat size too large
;                result = 5 : chainhead chain inconsistent
;                result = 5 : auxcat    chain inconsistent
;                result = 5 : illegal kind of chaintable
;                result = 5 : key illegal
;                result = 5 : too many slices
;                result = 5 : claims exceeded (too few slices for chaintable)
;                result = 5 : claims exceeded (auxcat too large)
;                result = 5 : claims exceeded (no room in maincat)
;                result = 6 : auxcat nameformat illegal
;                result = 6 : docname nameformat illegal
;                result = 7 : no chains idle
b. g10 h.

p51:             ; prepare bs:
     m8  , f71   ;    check function mask (aux catalog handling);
     m86         ;    move chainhead.sender to work and test auxcat size > 0;
           r5.   ;      auxcat size <= 0:  result 5;
; test the auxcat name:
     m70         ;    base.work := catalog interval;
     m17         ;    test new system name (wrk-name not allowed):
           r3.   ;      overlap:  result 3;
           r3.   ;      exact  :  result 3;
; test the document name:
; notice: the reservation ensures that the document does not exist
;         already in the bs-system
     m85         ;    search bs-process and check reserved by sender:
           r4.   ;      not found  or  not bs  or  not reserved:  result 4;
     m70         ;    base.work := catalog interval;  (because moved again...)
     m76         ;    test auxkey (and interval);
; give all claims to sender:
     m38         ;    find empty chain and prepare;
     m20         ;    copy chaintable chain;
; claim the slices used for chaintable:
     m25         ;    test claims (prepare bs);
           r5.   ;      claims exceeded:  result 5;
     m19         ;    test chain errors;
     m21         ;    copy chain and cut down (auxcat);
; claim the slices used for auxcat:
; (notice: the auxcat itself is not described in any catalog entry)
     m25         ;    test claims (prepare bs);
           r5.   ;      claims exceeded:  result 5;
     m19         ;    test chain errors;
; insert in maincat a description of the aux catalog
; (if maincat does not exist yet, it will take place when
;  the main catalog is connected)
     m0  , g5.   ;    if no maincat yet then goto no maincat;
     m31         ;    prepare maincat entry;
     m30         ;    test claims (create):
           r5.   ;      claims exceeded:  result 5;
     m14         ;    compute namekey;
     m55         ;    find empty entry;
           r5.   ;      no room:  result 5;
     m56         ;    modify cur entry;
g5:              ; no maincat:
     m40         ;    terminate update of new chainhead;
; notice: now the chain is included is the bs-system
;         (still not ready for normal use)
     m37 , t1    ;    state.chain := after prepare;
     m46 , 0     ;    setup area process (procfunc) for auxcat;
     m47 , 2     ;    include (sender) as user of auxcat area process;
     m49         ;    let sender be reserver of auxcat area process;
                 ;      (i.e. sender may now make any modifications
                 ;      in the auxcat)
                 ;       (hint: he could have done any damage before he
                 ;       called ..prepare bs.. so why not let him have the
                 ;       advantage of the area-process concept)
     j0          ;    result ok;

e.               ;



; insert entry
;
; call:
;   w1.sender :  entry address
;   w3.sender :  chainhead address
;
; return:
;   w0.sender :  result = 0 : entry inserted in main catalog
;                result = 1 : function forbidden in calling process
;                result = 2 : catalog io-error
;                result = 2 : document not found
;                result = 2 : state of document does not permit this call
;                result = 3 : name overlap
;                result = 3 : name already exists
;                result = 4 : calling process is not user of the device
;                result = 5 : key illegal
;                result = 5 : interval illegal
;                result = 5 : chain overlap
;                result = 5 : chain outside limits
;                result = 6 : nameformat illegal
;                result = 6 : docname format illegal
;                result = 6 : claims exceeded
;                result = 7 : maincat not present
;
; notice: the claims of the process are ok, when result = 0,3,(5),7

b. g20 h.

p52:             ; insert entry:
     m8  , f71   ;    check function mask (aux catalog handling)
     m109        ;    move chainhead.sender to work;
     m84         ;    (size.work := 0;)
     m36 , t21   ;    search chain (state = allowed for insert entry);
     m9          ;    check privileges;
     m37 , t2    ;    state.chain := during insert;
     m107        ;    move entry.sender to work;
     m76         ;    test auxkey, interval;

; notice: if the main catalog has been connected from this
;         document, the chain has already been copied, and
;         entry and slices claimed
     m3          ;    if main-catalog entry then
           r0.   ;      goto result ok;

     m21         ;    copy chain (entry) and cut down;
     m0  , g20.  ;    if no maincat then goto claim slices only;
     m30         ;    test claims (create entry):
           r6.   ;      claims exceeded:  result 6;
     m19         ;    test chain errors;
     m17         ;    test new system name (wrk-name not allowed):
           g15.   ;      overlap:  result 3;
           g15.   ;      exact  :  result 3;
; make it easy for changing the name of the document:
     m88 , g5.   ;    if size.work >= 0 then
     m66         ;      docname.work := docname.chain;
     m125, g10.  ;    else
g5:              ;      begin
     m90         ;      (prepare compute docnumber: prevent alarms)
     m91         ;      first slice.work := compute docnumber;
g10:             ;      end;
     m55         ;    find empty entry:
           r6.   ;      no room:  result 6;
     m56         ;    modify cur entry;
     j0          ;    result ok;
; 
; entry cannot be inserted in maincat but the entry is already claimed.
; unclaim 1 entry and 0 slices in main and auxcat and reclaim i entry in auxcat.

g15: m280, r7.         ; unclaim entries . (hardly claims exceeded.)
     m260, r7.         ; claim 1 aux entry.
     j3               ; deliver result 3

g20:             ; claim slices only:
; main catalog not present, therefor don't claim a maincat entry
     m26         ;    test claims (create aux entry);
           r6.   ;      claims exceeded:  result 6;
     m19         ;    test chain errors;
     j7          ;    result 7;

e.               ;



; insert backing storage
;
; call:
;   w2.sender :  docname address
;
; return:
;   w0.sender :  result = 0 : document included is bs-system
;                result = 1 : function forbidden in calling process
;                result = 2 : document not found
;                result = 2 : state of document does not permit this call
;                result = 4 : calling process is not user of device
;                result = 6 : docname format illegal

p53:             ; insert bs:
     m8  , f71   ;    check function mask (aux catalog handling);
     m104        ;    move docname.sender to docname.work;
     m84         ;    (size.work := 0;)
     m36 , t21   ;    search chain (state = allowed for insert bs);
     m9          ;    check privileges;
     m37 , t3    ;    state.chain := ready;
     j0          ;    result ok;



; delete backing storage
;
; call:
;   w2.sender :  docname address
;
; return:
;   w0.sender :  result = 0 : document removed from bs-system
;                result = 1 : function forbidden in calling process
;                result = 2 : catalog io-error
;                result = 2 : document not found
;                result = 4 : calling process is not user of device
;                result = 5 : areaprocesses exists for the document
;                result = 6 : main catalog on the document
;                result = 6 : docname format illegal

p54:             ; delete bs:
     m8  , f71   ;    check function mask (aux catalog handling);
     m104        ;    move docname.sender to docname.work;
     m84         ;    (size.work := 0);
     m36 , t23   ;    search chain (state = allowed for delete bs);
     m9          ;    check privileges;
     m115        ;    check any area processes on document;
     m1          ;    test main catalog not on document;
     m116        ;    prepare catalog scan;
     m37 , t4    ;    state.chain := during delete;

; the following assumes that the disc-driver handles messages:
;       last come => last served
; a (dummy) message is sent to the aux catalog (in this case an input
;   message, because such a procedure exists), and when the answer
;   arrives, all other area-transfers must have been terminated too.
; the chaintable may now (soon) be used by another disc, if wanted.

     m4          ;    set auxcat;
     m118        ;    (get first auxcat segment);
          r0.    ;      (no entries with namekey = 0, does'nt matter)

     j0          ;    result ok;



; delete entries
;
; call:
;   w2.sender :  docname address
;
; return:
;   w0.sender :  result = 0 : all entries deleted (from main catalog)
;                                 and chain released
;                result = 1 : function forbidden in calling process
;                result = 2 : catalog io-error
;                result = 2 : document not found
;                result = 2 : state of document does not permit this call
;                result = 3 : not all entries deleted yet
;                result = 4 : calling process is not user of device
;                result = 6 : docname format illegal

b. g10 h.

p55:             ; delete entries:
     m8  , f71   ;    check function mask (aux catalog handling);
     m104        ;    move docname.sender to docname.work;
     m84         ;    (size.work := 0;)
     m36 , t4    ;    search chain (state = during delete);
     m9          ;    check privileges;
     m0          ;    if no maincat then
           g10.  ;      goto clear up;

; clear a portion of the main catalog for entries belonging to curdoc
     m118        ;    for all curkey entries in main catalog do
           g5.   ;      begin
     m122, g1.   ;      if entry on document then
     m31         ;        prepare maincat entry;
     m28         ;        test claims (remove):
           r7.   ;          claims exceeded:  result 7;  (not possible)
     m120        ;        delete entry;
g1:              ;
     m119        ;      end for all entries;
g5:              ;
     m121        ;    update entry count, if any deleted;
     m117        ;    test more catalog segments to clean:
           r3.   ;      more segments:  result 3;

; all entries, belonging to curdoc, has been removed from main catalog:
g10:             ; clear up:
     m70         ;    base.work := catalog interval;
     m67         ;    move auxcat name from chain to name.work;
     m45         ;    search best area process:
           r7.   ;      not found:  result 7;  (not possible)
     m50         ;    (if area process then) delete area process;
     m41         ;    terminate use of chain and disc;
     m37 , t0    ;    state.chain := idle;
     j0          ;    result ok;

e.               ;



; connect main catalog
;
; call:
;   w1.sender :  main catalog name address
;   w3.sender :  chainhead address
;
; return:
;   w0.sender :  result = 0 : main catalog connected
;                result = 1 : function forbidden in calling process
;                result = 1 : area claims exceeded
;                result = 2 : catalog io-error
;                result = 2 : document not found
;                result = 2 : state of document does not permit this call
;                result = 3 : name does not exist in auxcat
;                result = 3 : name overlap
;                result = 3 : name already exists
;                result = 4 : calling process is not user of device
;                result = 5 : maincat size <= 0  or  maincat size too large
;                result = 5 : key illegal
;                result = 5 : interval illegal
;                result = 5 : chain overlap
;                result = 5 : chain outside limits
;                result = 6 : claims exceeded
;                result = 6 : docname format illegal
;                result = 7 : main catalog already present

b. g10 h.

p56:             ; connect main catalog:
     m8  , f72   ;    check function mask (main catalog handling);
     m0  , g1.   ;    if maincat already exists then
     j7          ;      result 7;
g1:              ;
     m109        ;    move chainhead.sender to work;
     m84         ;    (size.work := 0;)
     m36 , t21   ;    search chain (state = allowed for connect catalog);
     m9          ;    check privileges;
; prepare a search in auxcat for a main catalog:
     m103        ;    move catalog name.sender to name.work;
     m70         ;    base.work := catalog interval;
     m17         ;    test new system name (wrk-name not allowed):
           r3.   ;      overlap:  result 3;
           r3.   ;      exact  :  result 3;
     m4          ;    set auxcat;
     m10         ;    search best entry (in aux catalog):
           r3.   ;      not found:  result 3;
     m87         ;    if size.work <= 0 then
           r5.   ;      result 5;
     m76         ;    test auxkey  (and interval);
     m37 , t2    ;    state.chain := during insert;
     m21         ;    copy chain and cut down;
; claim an auxcat entry and the slices used for main catalog
     m26         ;    set claims (create aux entry):
           r6.   ;      claims exceeded :  result 6;
     m19         ;    test chain errors;
     m66         ;    docname.work := docname.curdoc;
     m46 , 0     ;    setup area process (procfunc) for main catalog area;
     m39         ;    set maincat and prepare claims;
     m5          ;    set maincat;
     m42         ;    clean main catalog;
     m67         ;    move auxcat name from chain to name.work;
     m70         ;    base.work := catalog interval;
     m45         ;    search best area process:
           r7.   ;      not found:  result 7;  (not possible)
     m47 , 2     ;    include (sender) as user of auxcat area process;
     m49         ;    let sender be reserver of auxcat area process;
                 ;      (see the hint in ..prepare backing storage..)

; insert all existing chainheads in main catalog
     m123        ;    for all existing chaintables do
           r0.   ;      begin
     m31         ;      prepare maincat entry;
     m30         ;      test claims (create);
           r6.   ;        claims exceeded:  result 6;
     m70         ;      base.work := catalog interval;
     m14         ;      compute namekey;
     m55         ;      find empty entry:
           r6.   ;        no room:  result 6;
     m56         ;      modify cur entry;
     m119        ;      end for;
                 ;    result ok;

e.               ;



; remove main catalog
;
; return:
;   w0.sender :  result = 0 : main catalog removed
;                result = 7 : main catalog not present

p57:             ; remove main catalog:
     m8  , f72+f71;   check function mask (main catalog handling);
     m0  , r7.   ;    if no maincat then result 7;
     m68         ;    move maincat name from pseudo chainhead to name.work;
     m70         ;    base.work := catalog interval;
     m45         ;    search best area process:
           r7.   ;      not found:  result 7;  (not possible)
     m50         ;    (if area process then) delete area process;
     m4          ;    set auxcat;  (i.e. prevent further use of main catalog)
     m2          ;    clear maincat;
     j0          ;    result ok;




; lookup bs claims
; call:
; w1.sender :  claim list address
; w2.sender :  document name address
; w3.sender :  name address

; return:
; w0.sender : result = 0 : bs claims looked up
;             result = 2 : document not found
;             result = 3 : process does not exist
;             result = 6 : name format illegal


p59:                   ; lookup bs claims
     m104              ; move docname.sender to docname.work 
     m84               ; size.work:=0
     m36,t22           ; search chain, state = allowed for normal use
     m65               ; move catbase,name to work;
     m51               ; find best internal process and move bs claims




; create aux entry and area process
;
; call:
;   w1.sender :  entry address
;   w2.sender :  docname address
;   w3.sender :  procname address
;
; return:
;   w0.sender :  result = 0 : entry and areaprocess created
;                result = 1 : function forbidden in calling process
;                result = 1 : area claims exceeded
;                result = 2 : catalog io-error
;                result = 2 : document not found
;                result = 2 : state of document does not permit this call
;                result = 3 : procname overlap
;                result = 3 : procname already exists
;                result = 3 : entryname overlap (in auxcat)
;                result = 3 : entryname already exists (in auxcat)
;                result = 4 : calling process is not user of device
;                result = 4 : claims exceeded
;                result = 5 : key illegal
;                result = 5 : interval illegal
;                result = 6 : entryname format illegal
;                result = 6 : procname  format illegal
;                result = 6 : docname format illegal

b. g10 h.

p60:             ; create aux entry and area process:
     m8  , f76   ;    check function mask (create aux entry);
     m104        ;    move docname.sender to docname.work;
     m84         ;    (size.work := 0;)
     m36 , t28   ;    search chain (state = allowed for create aux);
     m9          ;    check privileges;
     m107        ;    move entry.sender to work;
     m90         ;    first slice.work := 0;
     m88 , g1.   ;    if size.work >= 0 then
     m66         ;      docname.work := docname.chain;
g1:              ;
     m76         ;    test auxkey and interval;
; scan the auxcat to see if the new entry may be created:
     m4          ;    set auxcat;
     m18         ;    test new catalog name (in auxcat):
           r3.   ;      overlap:  result 3;
           r3.   ;      exact  :  result 3;
     m37 , t6    ;    state.chain := during aux entry manipulation;
     m22 , 2.10  ;    compute slices to claim  (compute new slices);
     m26         ;    test claims (create aux entry):
           r4.   ;      claims exceeded:  result 4;
     m23         ;    adjust chain to size;
     m55         ;    find empty entry:
           r4.   ;      no room:  result 4;
     m6          ;    dump chaintable;
    m60          ;    clear access counters.work;
    m56          ;    modify current entry;
    m88 , g2.    ;    if size.work>=0 then
    m62          ;      update and insert statarea;
g2:              ;
; prepare for testing of the area-process name:
     m5          ;    set maincat;
     m100        ;    move name.sender to name.work;  (i.e. get procname)
     m15         ;    test new system name (wrk-name allowed):
           r3.   ;      overlap:  result 3;
           r3.   ;      exact  :  result 3;
     m46 , 2     ;    setup area process (sender);
     m49         ;    let sender be reserver of the area-process;
     m101        ;    move name.work back to name.sender (if wrk-name);
     j0          ;    result ok;

e.               ;



; remove aux entry
;
; call:
;   w1.sender :  entry address
;   w2.sender :  docname address
;
; return:
;   w0.sender :  result = 0 : aux entry removed
;                result = 1 : function forbidden in calling process
;                result = 2 : catalog io-error
;                result = 2 : document not found
;                result = 2 : state of document does not permit this call
;                result = 3 : entry does not exist (in auxcat)
;                result = 6 : entry nameformat illegal
;                result = 6 : docname format illegal

p61:             ; remove aux entry:
     m8  , f76   ;    check function mask (create aux);
     m104        ;    move docname.sender to docname.work;
     m84         ;    (size.work := 0;)
     m36 , t28   ;    search chain (state = allowed for aux entry manipulation
     m9          ;    test privileges;
     m4          ;    set auxcat;
     m107        ;    move entry.sender to work;
; notice: there is no check upon legality of interval
     m10         ;    search best entry (in auxcat):
           r3.   ;      not found:  result 3;
; notice: it is not checked that it was the rigth entry (i.e. same base)
     m37 , t4    ;    state.chain := during aux entry manipulation;
     m57         ;    delete cur entry;
; notice: the entry- and slice-claims are not released, nor is the slice-chain
     j0          ;    result ok;

; lookup aux entry
; 
; call:
;   w1.sender : tail address
;   w2.sender : docname address
;   w3.sender : name address
;
;  return:
;    w0.sender : result = 0 : entry looked up
;                result = 2 : catalog input-output error
;                result = 2 : document not ready( or does not exist
;                result = 3 : entry not found
;                result = 6 : name format illegal
;                result = 7 : maincat not present

p43:             ; lookup auxentry:
     m0  , r7.   ;   check maincat
     m65         ;   move catbase.name to work
     m104        ;   move docname.sender to docname.work
     m84         ;   size.work:=0
     m36 , t3    ;   search chain (state ready)
     m4          ;   set auxcat
     m100        ;   move entry.sender to entry.work
     m10         ;   seach best entry
           r3.   ;   not found result 3
     m106        ;   move tail.sender to tail.sender
     m5          ;   set main cat
     j0          ;   result ok

; clear statistics in aux entry
; 
;  call:
;    w2.sender : dacname address
;    w3.sender : name address
; 
;  return:
;    w0.sender : result = 0 : the statistiks of the entry is initialised
;                result = 2 : catalog input/output error
;                result = 2 : document not ready(or does not exist)
;                result = 3 : entry not found; name conflict(in auxcat)
;                result = 6 : name format illegal; claims exceeded
;                result = 7 : maincat not present
b.g10 h.

p44:             ; 
     m0  , r7.   ;   if no maincat then result 7
     m65         ;   move catbase.sender to work
     m104        ;   move docname.sender to docname.work
     m84         ;   size.work:=0
     m36 , t3    ;   search chain (state ready)
     m4          ;   set aux cat
     m100        ;   move entry.sender to entry.work
     m10         ;   search best entry
           r3.   ;     not found result 3
     m88 , g0.   ;   if size.work>=0 then
     m64         ;     move statarea.entry to statarea.work
     m60         ;     clear access counters.work
     m63         ;     move statarea.work to statarea.entry
g0:              ;
     m5          ;   set main cat
     j0          ;   result ok
e.
\f





n49:             ; start of monitor call-table:
     p20., p21., p22., p23., p24., p25., p26., p27., p28., p29.,
     p30., p31., p32., r7. , p34., p35., p36., p37., p38., p39.,
     p40., r7. , p42., p43., p44. , p45., p46., r7. , r7. , r7. ,
     r7. , p51., p52., p53., p54., p55., p56., p57., r7.,p59. ,
     p60., p61.,
w.

j0 = j0+n50 , j1 = j1+n50 , j2 = j2+n50 , j3 = j3+n50 , j4 = j4+n50 ,
j5 = j5+n50 , j6 = j6+n50 , j7 = j7+n50




; record cat buf:
;   this record holds the current catalog segment.  if its content is
;   changed, then the segment is rewritten onto the backing store at
;   the very end of all process function actions.

d0: -1, r.f9>1                  ; cat buf (0:size-2);
d18: 0                          ;   last word of cat buf.
d19 = d0 - 2 + f10*f0           ;   abs addr of last word of last entry
                                ;      in cat buf.

c.(:a92>22a.1:)-1
m.                procfunc testbuffer, start
d49=k, 0, r.100, d50=k
m.                procfunc testbuffer, top
z.

; interrupt address (used during debugging):
;   proc func is entered here after programming errors.

c.  (:a92>21a.1:) -1
e30: 0, r.a180>1                ; ia: save for registers;
     al. w1   e30.              ;   if included print then
     rl  w0   x1+0              ;   begin
     jd     1<11+28             ;     for i:=ia step 2 until ia+12 do
     al  w1   x1+2              ;      print w (word(i));
     sh. w1   e30.+a180-2       ;     wait forever in disabled mode;
     jl.      -8                ;
     jl.      (2)
     j7
z.c. -(:a92>21a.1:)             ;   else
e30 = 0,z.                      ;   ia:= 0;

; code for printing of proc func variables during debugging:
e28: c.(:a92>19a.1:) -1         ; if test call included 
b.   g24                        ; then begin
w.   jl.     x1+g0.             ;   goto case print param of (
g0:  jl.     (g17.)             ;      0:  error 7,
     jl.      g1.               ;      2:  print cur entry,
     jl.      (g17.)            ;      4:  print pf variables);

g1:  rl. w3  (g13.)             ; print cur entry:
     al  w2  x3+f0              ;   for addr:= cur entry addr
g3:  rl  w1  x3                 ;   step 2 until cur entry addr+entry size
     jd     1<11+30             ;   do  print x (word(addr));
     al  w3  x3+2               ;
     sh  w3  x2                 ;
     jl.      g3.               ;
     jl.     (g11.)             ;   goto error 1;

g11: j1, g17: j7,  g13: d3, 
e.z.                            ; end;

; define the last b-names:

b61 = k         ;   top address.proc func
b62 = e30       ;   interrupt address.proc func
b63 = j10+2     ;   waiting point
i.              ; id list of process functions

; after loading:
b.   g0                         ; begin
w.g0:al. w2   g0.               ; define last:
     jl      x3                 ;   autoload(next segment,top proc func);

     jd.      g0.               ; after loading: goto define last;
e.                              ; end.  the load code is removed;
  j21=k - b127 + 2

k = b61         ; top proc func
e.              ; end proc func segment

; segment 7:  Initialize  process  functions
;   this segment initializes the process descriptions for the first internal
;   process (proc func). it is executed and then removed
;   immediately after loading.

s.   g6                      ; begin  init proc func:
w.b127=k, g6, k=k-2

g0:  al. w2     g0.    ; after load: load address := top of procfunc;
     jl      x3        ;    goto autoloader;
     jl.        g0.    ; entry from autoloader: goto after load;
g6= k - b127 + 2

k = b61                      ; k= first after proc func;
e.                           ; end init proc func
▶EOF◀