Annotation of researchv10no/sys/ml/misc.s, revision 1.1

1.1     ! root        1: #
        !             2: # miscellaneous assembly stuff
        !             3: #
        !             4: 
        !             5:        .globl  _u
        !             6:        .set    _u,KA - UPAGES*NBPG
        !             7: 
        !             8:        .text
        !             9: 
        !            10: _addupc:       .globl  _addupc
        !            11:        .word   0x0
        !            12:        movl    8(ap),r2                # &u.u_prof
        !            13:        subl3   8(r2),4(ap),r0          # corrected pc
        !            14:        blss    9f
        !            15:        extzv   $1,$31,r0,r0            # logical right shift
        !            16:        extzv   $1,$31,12(r2),r1        # ditto for scale
        !            17:        emul    r1,r0,$0,r0
        !            18:        ashq    $-14,r0,r0
        !            19:        tstl    r1
        !            20:        bneq    9f
        !            21:        incl    r0
        !            22:        bicl2   $1,r0
        !            23:        cmpl    r0,4(r2)                # length
        !            24:        bgequ   9f
        !            25:        addl2   (r2),r0                 # base
        !            26:        probew  $3,$2,(r0)
        !            27:        beql    8f
        !            28:        addw2   12(ap),(r0)
        !            29: 9:
        !            30:        ret
        !            31: 8:
        !            32:        clrl    12(r2)
        !            33:        ret
        !            34: 
        !            35: #
        !            36: # 2-byte access to memory;
        !            37: # useful for UNIBUS address space
        !            38: # someone has already probed access
        !            39: #
        !            40: # UNIcpy(uniaddr, useraddr, count, direct)
        !            41: # direct is nonzero (B_READ) if data is going to useraddr
        !            42: #
        !            43: # returns nonzero if access failed, like copyin
        !            44: #
        !            45: 
        !            46:        .globl  _UNIcpy
        !            47: _UNIcpy:
        !            48:        .word   0
        !            49:        movl    4(ap),r0        # from
        !            50:        movl    8(ap),r1        # to
        !            51:        tstl    16(ap)
        !            52:        jneq    1f
        !            53:         movl   8(ap),r0        # from
        !            54:         movl   4(ap),r1        # to
        !            55: 1:
        !            56:        divl3   $2,12(ap),r2    # byte count
        !            57:        jeql    3f
        !            58:        pushl   _nofault
        !            59:        movab   9f,_nofault
        !            60: 2:
        !            61:        movw    (r0)+,(r1)+
        !            62:        sobgtr  r2,2b
        !            63: 3:
        !            64:        movl    (sp)+,_nofault
        !            65:        clrl    r0              # ok
        !            66:        ret
        !            67: 
        !            68: 9:
        !            69:        movl    (sp)+,_nofault
        !            70:        mnegl   $1,r0           # error
        !            71:        ret
        !            72: 
        !            73: #
        !            74: # `safe' (nofault-protected) mfpr/mtpr
        !            75: # umptr returns 1 if ok, 0 if not
        !            76: # umfpr returns 0 on error, which is ambiguous.  too bad.
        !            77: # they should really set u.u_error.
        !            78: #
        !            79: 
        !            80:        .globl  _umfpr
        !            81: _umfpr:        .word   0
        !            82:        pushl   _nofault
        !            83:        movab   9f,_nofault
        !            84:        mfpr    4(ap),r0
        !            85:        movl    (sp)+,_nofault
        !            86:        ret
        !            87: 
        !            88:        .globl  _umtpr
        !            89: _umtpr:        .word   0
        !            90:        pushl   _nofault
        !            91:        movab   9f,_nofault
        !            92:        mtpr    8(ap),4(ap)
        !            93:        movl    (sp)+,_nofault
        !            94:        movl    $1,r0
        !            95:        ret
        !            96: 
        !            97: 9:
        !            98:        movl    (sp)+,_nofault
        !            99:        clrl    r0
        !           100:        ret
        !           101: 
        !           102: #
        !           103: # here on stray interrupt
        !           104: #
        !           105: 
        !           106:        .globl  Xstray
        !           107: Xstray:
        !           108:        pushr   $SAVREG
        !           109:        subl3   $straycatch+3,NRS*4(sp),-(sp)
        !           110:        calls   $1,_strayintr
        !           111:        popr    $SAVREG
        !           112:        tstl    (sp)+
        !           113:        rei

unix.superglobalmegacorp.com

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