Annotation of cci/d/entry/clr_b.s, revision 1.1

1.1     ! root        1: 
        !             2: 
        !             3: /*             CLRB (clear byte) test                                  */
        !             4: 
        !             5: /*Test name = Clrb                                                     */
        !             6: /*Description =                                                                */
        !             7: /*     This test checks "clrb" instruction to see that                 */
        !             8: /*     (1)destination is cleared to zero                               */
        !             9: /*     (2)Z flag is set to one                                         */
        !            10: /*     (3)N and V flags are set to zero                                */
        !            11: /*     (4)C flag is set to one.                                        */
        !            12: /*     Register 0 (r1) & memory location tmloc(lebel) are used as      */
        !            13: /*     destination.                                                    */
        !            14: /*                                                                     */
        !            15: /*     Constants definition                                            */
        !            16: /*                                                                     */
        !            17:        .set    IPL,8
        !            18:        .set    HIGH,31
        !            19:        .set    ZERO,0
        !            20:        .set    ONES,0xffffffff
        !            21:        .set    N,8
        !            22:        .set    Z,4
        !            23:        .set    V,2
        !            24:        .set    C,1
        !            25:        .set    EXPL,0
        !            26:        .set    EXPW,0
        !            27:        .set    EXPB,0
        !            28:        .set    PSWMASK,0x003f
        !            29:        .globl  _clr_b
        !            30: _clr_b:
        !            31:        callf   $4,_setjmp      /* save caontext for error return */
        !            32:        movab   _clr_b,_stpc    /* save subtest address */
        !            33:        movl    $1,_subtst      /* subtest number */
        !            34:        movl    $1,_no_opr      /* number of operands in use */
        !            35:        movl    $ONES,_opr      /* first operand */
        !            36: 0:     movl    $ONES,r3        /*set r3 to all bits ones               */
        !            37:        bicpsw  $PSWMASK        /*disable overflow & other enable bits  */
        !            38:        bispsw  $(N|V)          /*turn negetive, overflow, &            */
        !            39:        clrb    r3              /*execute "clrb"                        */
        !            40:        bneq    error1          /*error if Z = 0                        */
        !            41:        blss    error1          /*error if N = 1                        */
        !            42:        bvs     error1          /*error if V = 1                        */
        !            43:        bcc     error1          /*error if C = 0                        */
        !            44:        jmp     1f
        !            45: error1:        movpsl  _actual         /* actual psl MAYBE it is incorrect */
        !            46:        bbs     $0,_scoplp,0b   /* if set loop on error */
        !            47:        movl    $2,_ercode      /* error code flag failure */
        !            48:        jmp     *badrtn
        !            49: 1:     bicpsw  $Z              /*clear Z flag                          */
        !            50:        cmpl    r3,$EXPB        /*check r3 = expected value             */
        !            51:        beql    clrbm           /*if no error then continue */
        !            52:        bbs     $0,_scoplp,0b   /* if set scope loop on error */
        !            53:        movl    $1,_ercode      /* error code data miscompare */
        !            54:        movl    r3,_actual      /* actual data */
        !            55:        movl    $EXPB,_expected /* expected data */
        !            56:        jmp     *badrtn
        !            57: /*                                                                     */
        !            58: /*     Now repeat the above test with a memory location (tmloc).       */
        !            59: /*                                                                     */
        !            60:        
        !            61: clrbm:
        !            62:        bbs     $0,_force_lp,0b /* if set loop on last subtest */
        !            63: c2:    callf   $4,_setjmp      /* save caontext for error return */
        !            64:        movab   c2,_stpc        /* save subtest address */
        !            65:        movl    $2,_subtst      /* subtest number */
        !            66: 0:     movl    $ONES,tmloc     /*set tmloc to all bits ones            */
        !            67:        bicpsw  $PSWMASK
        !            68:        bispsw  $(N|V)          /*turn negetive, and overflow           */
        !            69:                                /*ON in PSW                             */
        !            70:        clrb    tmloc           /*execute "clrb"                        */
        !            71:        bneq    error2          /*error if Z = 0                        */
        !            72:        blss    error2          /*error if N = 1                        */
        !            73:        bvs     error2          /*error if V = 1                        */
        !            74:        bcc     error2          /*error if C = 0                        */
        !            75:        jmp     1f
        !            76: error2:        movpsl  _actual         /* actual psl MAYBE it is incorrect */
        !            77:        bbs     $0,_scoplp,0b   /* if set loop on error */
        !            78:        movl    $2,_ercode      /* error code flag failure */
        !            79:        jmp     *badrtn
        !            80: 1:     bicpsw  $Z              /*clear Z flag                          */
        !            81:        movl    $0x00ffffff,r4
        !            82:        cmpl    tmloc,$0x00ffffff/*check tmloc = expected value         */
        !            83:        beql    1f              /*if not, error */
        !            84:        bbs     $0,_scoplp,0b   /* if set scope loop on error */
        !            85:        movl    $1,_ercode      /* error code data miscompare */
        !            86:        movl    tmloc,_actual   /* actual data */
        !            87:        movl    $0x00ffffff,_expected   /* expected data */
        !            88:        jmp     *badrtn
        !            89: 1:     bbs     $0,_force_lp,0b /* if set loop on last subtest */
        !            90:        jmp     *return         /* good, return to monitor */
        !            91: 
        !            92: 
        !            93: /*                                                                     */
        !            94: /*     Variables definition                                            */
        !            95: /*                                                                     */
        !            96:        .align  2
        !            97: tmloc: .long   0xffffffff      
        !            98: /*     End of file                                     */
        !            99: 

unix.superglobalmegacorp.com

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