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

⟦d5dc2a7cc⟧ TextFile

    Length: 3840 (0xf00)
    Types: TextFile
    Names: »chop«

Derivation

└─⟦621cfb9a2⟧ Bits:30002817 RC8000 Dump tape fra HCØ.  Detaljer om "HC8000" projekt.
    └─⟦0364f57e3⟧ 
        └─⟦this⟧ »chop« 

TextFile


; elementary link-procedures:

; procedure remove(elem);
; comment: removes a given element from its queue and leaves the element linked to itself.
; call: w2=elem, w3=link
; exit: w0, w1, w2=unchanged, w3=next(elem)
; return address: link

b. i1 w.
e5:  rs. w3     i0.    ;    save return;
     rl  w3  x2        ;    w3 := next(elem);
     rx  w2  x2+2      ;    w2 := prev(elem);  prev(elem) := elem;
     rs  w3  x2        ;    next(w2) := next(elem);
     rx  w2  x3+2      ;    w2 := elem;  prev(next(elem)) := old prev(elem);
     rs  w2  x2        ;    next(elem) := elem;
     jl.       (i0.)   ;    return;

; procedure link(head, elem);
; comment: links the element to the end of the queue
; call: w1=head, w2=elem, w3=link
; exit: w0, w1, w2=unchanged, w3=old last(head);
e6:  rs. w3     i0.    ;    save return;
     rl  w3  x1+2      ;    old last:=last(head);
     rs  w2  x1+2      ;    last(head):=elem;
     rs  w2  x3+0      ;    next(old last):=elem;
     rs  w1  x2+0      ;    next(elem):=head;
     rs  w3  x2+2      ;    last(elem):=old last;
     jl.       (i0.)   ;    return;
i0: 0                  ; saved return: remove, link
e.

; procedure check reservation
; comment: checks whether an external process is reserved
; by the current internal process.
;      call:    return:
; w0            reserved
; w1   cur      cur
; w2   buf      buf
; w3   link     link

b.i24                 ; begin
w.
i0: 0                  ; return
e15:                   ;  check reserver;
     jl       x3       ;  normal return else
     rl.  w0     b1.   ;  w0:=reserver
     se   w0     0     ;
     jl.         i0.
     rs.  w0     b1.   ;
     jl.         r2.   ;  result 2;
e.                    ; end

; procedure check operation(oper mask, mode mask)
; comment: checks whether the operation and mode are
; within the repertoire of the receiver. the legal values are
; defined by two bitpatterns in which bit i=1 indicates
; that operation (or mode) number i is allowed. if the
; operation is odd, it is checked whether the input/output
; area is within the internal process.
;     call:       return:
; w0  oper mask   destroyed
; w1  mode mask   destroyed
; w2  buf         buf
; w3  link        destroyed

b.i24                 ; begin
w.e16:rs. w3  i0.     ;
      bz  w3  x2+9    ;
      ls  w1  x3+0    ;
      bz  w3  x2+8    ;
      ls  w0  x3+0    ;
      sh  w0  -1      ;   if mode mask(mode(buf))=0
      sl  w1   0      ;   or oper mask (operation(buf))=0
      jl.     r3.     ;   then goto result 3;
      so  w3  1       ;
      jl.    (i0.)    ;
      rl  w1  x2+6    ;
      dl  w0  x2+12   ;   if odd(operation(buf))
      la. w3  g50.    ;   make first and
      la. w0  g50.    ;   last address  in buf even;
;      sl  w3 (x1+a17) ;   and (first addr(buf)<first addr(sender)
;      sl  w0 (x1+a18) ;   or last addr(buf)>=top addr(sender)
;      jl.     r3.     ;
      sh  w0  x3-2+510;   or first addr(buf)>last addr(buf))-510
      jl.     r3.     ;   then goto result 3;
;      ds  w0  x2+12   ;   message even;
      jl.    (i0.)    ;
  i0: 0               ;
e.                    ; end

;procedure deliver simple result(result);
;
;          calll          return
; w0       result         destroyed
; w1                      destroyed
; w2       buf            destroyed
; w3       link           destroyed
b.w.
r4: am      1         ; result 4
r3: am      1         ; result 3
r2: am      1         ; result 2
r1: al  w0  1         ; result 1
r0: jd  1<11+26       ; get event
    al. w1  b20.      ; w1:=answer
    jd  1<11+22       ; send answer
    jl.     e0.       ; goto wait event(0)
e.
▶EOF◀