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

1.1       root        1: 
                      2: 
                      3: /*             CLRW (clear word) test                                  */
                      4: 
                      5: /*Test name = Clrw                                                     */
                      6: /*Description =                                                                */
                      7: /*     This test checks "clrw" 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 1.                                          */
                     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,0x0000ffff
                     27:        .set    EXPB,0xffffff00
                     28:        .set    PSWMASK,0x003f
                     29:        .globl  _clr_w
                     30: _clr_w:
                     31:        callf   $4,_setjmp      /* save context for error return */
                     32:        movab   _clr_w,_stpc    /* save subtest starting 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:        clrw    r3              /*execute "clrw"                        */
                     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 did not remain 1           */
                     44:        jmp     1f      
                     45: error1:        movpsl  _actual         /* actual = psl MAYBE it is incorrect */
                     46:        bbs     $0,_scoplp,0b   /* if set scope loop on error */
                     47:        movl    $2,_ercode      /* error code flag failure */
                     48:        jmp     *badrtn
                     49: 1:     bicpsw  $Z              /*clear Z flag                          */
                     50:        cmpl    r3,$0           /*check r1 = expected value             */
                     51:        beql    clrwm           /*if no error 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    $0,_expected    /* expected data */
                     56:        jmp     *badrtn
                     57: /*                                                                     */
                     58: /*     Now repeat the above test with a memory location (tmloc).       */
                     59: /*                                                                     */
                     60:        
                     61: clrwm:
                     62:        bbs     $0,_force_lp,0b /* if set loop on last subtest */
                     63:        callf   $4,_setjmp      /* save context for error return */
                     64: c2:    movab   clrwm,_stpc     /* save subtest starting address */
                     65:        movl    $2,_subtst      /* subtest number */
                     66: 0:     movl    $ONES,tmloc     /*set tmloc to all bits ones            */
                     67:        bicpsw  $PSWMASK
                     68:        clrw    tmloc           /*execute "clrw"                        */
                     69:        bneq    error2          /*error if Z = 0                        */
                     70:        blss    error2          /*error if N = 1                        */
                     71:        bvs     error2          /*error if V = 1                        */
                     72:        bcc     error2          /*error if C did not remain 1           */
                     73:        jmp     1f      
                     74: error2:        movpsl  _actual         /* actual = psl MAYBE it is incorrect */
                     75:        bbs     $0,_scoplp,0b   /* if set scope loop on error */
                     76:        movl    $2,_ercode      /* error code flag failure */
                     77:        jmp     *badrtn
                     78: 1:     bicpsw  $Z              /*clear Z flag                          */
                     79:        cmpl    tmloc,$EXPW     /*check tmloc = expected value          */
                     80:        beql    aldn            /*if no error all done ! */
                     81:        bbs     $0,_scoplp,0b   /* if set scope loop on error */
                     82:        movl    $1,_ercode      /* error code data miscompare */
                     83:        movl    tmloc,_actual   /* actual data */
                     84:        movl    $EXPW,_expected /* expected data */
                     85:        jmp     *badrtn
                     86:                                /*after "clrw" instruction              */
                     87: aldn:  bbs     $0,_force_lp,0b /* if set loop on last subtest */
                     88:        jmp     *return         /* good, return to monitor */
                     89: 
                     90: /*                                                                     */
                     91: /*     Variables definition                                            */
                     92: /*                                                                     */
                     93:        .align  2
                     94: tmloc: .long   0xffffffff
                     95: 
                     96: /*     end     */

unix.superglobalmegacorp.com

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