Annotation of cci/d/entry/clr_l.s, revision 1.1.1.1

1.1       root        1: 
                      2: 
                      3: /*             CLRL (clear long) test                                  */
                      4: 
                      5: /*Test name = Clrl                                                     */
                      6: /*Description =                                                                */
                      7: /*     This test checks "clrl" 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 one.                                               */
                     12: /*     Register 1 (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,0X00000000
                     26:        .set    EXPW,0xffff0000
                     27:        .set    EXPB,0xffffff00
                     28:        .set    PSWMASK,0x003f
                     29: 
                     30:        .globl  _clr_l
                     31: _clr_l:
                     32:        callf   $4,_setjmp      /* save context for error return */
                     33:        movab   _clr_l,_stpc    /* save context for error return */
                     34:        movl    $1,_subtst      /* subtest number */
                     35:        movl    $1,_no_opr      /* number of operands in use */
                     36:        movl    $ONES,_opr      /* first operand */
                     37: 0:     movl    $ONES,r3        /*set r3 to all bits ones               */
                     38:        bicpsw  $PSWMASK        /*disable overflow & other enable bits  */
                     39:        bispsw  $(N|V)          /*turn negetive, &  overflow            */
                     40:        clrl    r3              /*execute "clrl"                        */
                     41:        bneq    error1          /*error if Z = 0                        */
                     42:        blss    error1          /*error if N = 1                        */
                     43:        bvs     error1          /*error if V = 1                        */
                     44:        bcc     error1          /*error if C did not remain 1           */
                     45:        jmp     1f
                     46: error1:        movpsl  _actual         /* actual = psl MAYBE it is incorrect */
                     47:        bbs     $0,_scoplp,0b   /* if set scope loop on error */
                     48:        movl    $2,_ercode      /* error code flag miscompare */
                     49:        jmp     *badrtn
                     50: 1:     bicpsw  $Z              /*clear Z flag                          */
                     51:        cmpl    r3,$EXPL        /*check r3 = expected value             */
                     52:        beql    clrlm           /*if not, error         */
                     53:        bbs     $0,_scoplp,0b   /* if set scope loop on error */
                     54:        movl    $1,_ercode      /* error code data miscompare */
                     55:        movl    r3,_actual      /* actual data */
                     56:        movl    $EXPL,_expected /* expected data */
                     57:        jmp     *badrtn
                     58: /*                                                                     */
                     59: /*     Now repeat the above test with a memory location (tmloc).       */
                     60: /*                                                                     */
                     61:        
                     62: clrlm:
                     63:        bbs     $0,_force_lp,0b /* if set loop on last subtest */
                     64: c2:    callf   $4,_setjmp      /* save context for error return */
                     65:        movab   c2,_stpc        /* save context for error return */
                     66:        movl    $2,_subtst      /* subtest number */
                     67: 0:     movl    $ONES,tmloc     /*set tmloc to all bits ones            */
                     68:        bicpsw  $PSWMASK
                     69:        bispsw  $(N|V)          /*turn negetive, &  overflow             */
                     70:        clrl    tmloc           /*execute "clrl"                        */
                     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 did not remain 1           */
                     75:        jmp     1f
                     76: error2:        movpsl  _actual         /* actual = psl MAYBE it is incorrect */
                     77:        bbs     $0,_scoplp,0b   /* if set scope loop on error */
                     78:        movl    $2,_ercode      /* error code flag miscompare */
                     79:        jmp     *badrtn
                     80: 1:     bicpsw  $Z              /*clear Z flag                          */
                     81:        cmpl    tmloc,$EXPL     /*check tmloc = expected value          */
                     82:        beql    aldn            /*if no error all done ! */
                     83:        bbs     $0,_scoplp,0b   /* if set scope loop on error */
                     84:        movl    $1,_ercode      /* error code data miscompare */
                     85:        movl    tmloc,_actual   /* actual data */
                     86:        movl    $EXPL,_expected /* expected data */
                     87:        jmp     *badrtn
                     88: aldn:  bbs     $0,_force_lp,0b /* if set loop on last subtest */
                     89:        jmp     *return         /* good, return to monitor */
                     90: 
                     91: 
                     92: /*                                                                     */
                     93: /*     Variables definition                                            */
                     94: /*                                                                     */
                     95:        .align  2
                     96: tmloc: .long   0xffffffff      
                     97: /*                                                                     */
                     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.