Annotation of 43BSDTahoe/new/X/CLUlib/sun/x_vlist.asm, revision 1.1.1.1

1.1       root        1: ; Copyright    Barbara Liskov    1986
                      2: 
                      3: x_vlist = cluster is create, fetch, store, size, equal
                      4: 
                      5: rep = null
                      6: 
                      7: create = qproc (n: int) returns (cvt) signals (toobig)
                      8:        ifle    move    rr,n1
                      9:                blt     next
                     10:                cmpi    #5,,#5555,n1
                     11:        then    add     n1,n1
                     12:                add     rr,n1
                     13:                add     n1,n1
                     14:                subq    5,n1
                     15:                move    n1,n2
                     16:                asr     1,n2
                     17:                addq    7,n2
                     18:                andib   -4,n2
                     19:                movea   heaphi,rr
                     20:                iflt    sub     n2,freecnt
                     21:                then    jsr     memout
                     22:                end
                     23:                add     n2,heaphi
                     24:                move    n1,(rr)
                     25:                return(rr)
                     26:        end
                     27:        signal  toobig
                     28:        end create
                     29: 
                     30: store = qproc (list: cvt, i: int, x, y, flags: int) signals (bounds)
                     31:        move    i,n2
                     32:        subq    5,n2
                     33:        add     n2,n2
                     34:        add     i,n2
                     35:        addq    1,n2
                     36:        movea   list,r1
                     37:        move    (r1),n1
                     38:        asr     1,n1
                     39:        ifhi    cmp     n2,n1
                     40:        then    lea     4(r1,n2),r1
                     41:                move    x,n1
                     42:                asr     1,n1
                     43:                movew   n1,(r1)+
                     44:                move    y,n1
                     45:                asr     1,n1
                     46:                movew   n1,(r1)+
                     47:                move    rr,n1
                     48:                asr     1,n1
                     49:                movew   n1,(r1)
                     50:                movea   n0,r1
                     51:                return
                     52:        end
                     53:        signal  bounds
                     54:        end store
                     55: 
                     56: fetch = qproc (list: cvt, i: int) returns (int, int, int) signals (bounds)
                     57:        move    rr,n1
                     58:        subq    5,n1
                     59:        add     n1,n1
                     60:        lea     1(rr,n1),rr
                     61:        movea   list,r1
                     62:        move    (r1),n1
                     63:        asr     1,n1
                     64:        ifhi    cmp     rr,n1
                     65:        then    lea     4(r1,rr),rr
                     66:                moveaw  (rr)+,r1
                     67:                pea     1(r1,r1)
                     68:                moveaw  (rr)+,r1
                     69:                pea     1(r1,r1)
                     70:                moveaw  (rr),rr
                     71:                lea     1(rr,rr),rr
                     72:                return(*, *, *)
                     73:        end
                     74:        signal  bounds
                     75:        end fetch
                     76: 
                     77: size = qproc (list: cvt) returns (int)
                     78:        move    (rr),n1
                     79:        asr     1,n1
                     80:        divu    3,n1
                     81:        moveaw  n1,rr
                     82:        addq    1,rr
                     83:        return(rr)
                     84:        end size
                     85: 
                     86: equal = qproc (list1, list2: cvt) returns (bool)
                     87:        moveq   0,n1
                     88:        cmpa    list1,rr
                     89:        seq     n1
                     90:        return(n1)
                     91:        end equal
                     92: 
                     93: end x_vlist

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.