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

1.1       root        1:                
                      2: 
                      3: 
                      4: /*             SUBW3 (subtract word3) test                             */
                      5: /*                                                                     */
                      6: /*Test name = subw3                                                    */
                      7: /*Description =                                                                */
                      8: /*     This test checks 'subw3' instruction as follows:                */
                      9: /*sub          min             dif             N Z V C (flags)         */
                     10: /*___          ___             ______          _______________         */
                     11: /*0x7f         0x7f            0x00            0 1 0 1                 */
                     12: /*0xff         0x01            0x02            0 0 0 0                 */
                     13: /*0x01         0xff            0xfe            1 0 0 1                 */
                     14: /*0x81         0x7f            0xfe            1 0 1 0                 */
                     15: /*0x81         0x80            0xff            1 0 0 0                 */
                     16: /*0x7f         0x81            0x02            0 0 1 1                 */
                     17: /*                                                                     */
                     18: /*                                                                     */
                     19: 
                     20: /*                                                                     */
                     21: /*                                                                     */
                     22: /*     constants definition for 'subx' tests.                          */
                     23: /*                                                                     */
                     24: 
                     25:        .set    SB1,0x11111f7f/*+127, highest +ve number, byte  */
                     26:        .set    SW1,0x111f7fff
                     27:        .set    SL1,0x7fffffff
                     28:        .set    MB1,0x11111f7f/* +127 */
                     29:        .set    MW1,0x111f7fff
                     30:        .set    ML1,SL1
                     31:        .set    RB1,0x11111f00
                     32:        .set    RW1,0x111f0000
                     33:        .set    RL1,0x00000000
                     34:        .set    SB2,0xff        /* -1 */
                     35:        .set    SW2,0xffff
                     36:        .set    SL2,0xffffffff
                     37:        .set    MB2,0x01        /* +1 */
                     38:        .set    MW2,0x0001
                     39:        .set    ML2,0X00000001
                     40:        .set    RB2,0x00000002  /* +2 */
                     41:        .set    RW2,RB2
                     42:        .set    RL2,RB2
                     43:        .set    SB3,MB2         /* +1 */
                     44:        .set    SW3,MW2
                     45:        .set    SL3,ML2
                     46:        .set    MB3,0xff                /* -1 */
                     47:        .set    MW3,0xffff
                     48:        .set    ML3,0xffffffff
                     49:        .set    RB3,0x000000fe  /* -2 */
                     50:        .set    RW3,0x0000fffe
                     51:        .set    RL3,0Xfffffffe
                     52:        .set    SB4,0x81        /* -127 */
                     53:        .set    SW4,0x8001
                     54:        .set    SL4,0x80000001
                     55:        .set    MB4,0x7f        /* 127 */
                     56:        .set    MW4,0x7fff
                     57:        .set    ML4,0x7fffffff
                     58:        .set    RB4,0xfe                /* -2 */
                     59:        .set    RW4,0xfffe
                     60:        .set    RL4,0xfffffffe
                     61:        .set    SB5,SB4 /* -127 */
                     62:        .set    SW5,SW4
                     63:        .set    SL5,SL4
                     64:        .set    MB5,0x80        /* -128 */
                     65:        .set    MW5,0x8000
                     66:        .set    ML5,0x80000000
                     67:        .set    RB5,0xff                /* -1 */
                     68:        .set    RW5,0xffff
                     69:        .set    RL5,0xffffffff
                     70:        .set    SB6,0x7f/* +127 */
                     71:        .set    SW6,0x7fff
                     72:        .set    SL6,0x7fffffff
                     73:        .set    MB6,SB4         /* -127 */
                     74:        .set    MW6,SW4
                     75:        .set    ML6,SL4
                     76:        .set    RB6,0x02
                     77:        .set    RW6,0x02
                     78:        .set    RL6,0x02
                     79: 
                     80:        .set    INITB,0x11111f55/* initialization values for 3 operand */
                     81:        .set    INITW,0x111f5555
                     82:        .set    INITL,0X55555555
                     83:        
                     84: /*                                                                     */
                     85: /*     Syst.s - Constants                                              */
                     86: /*                                                                     */
                     87:        .set    IPL,8
                     88:        .set    HIGH,31
                     89:        .set    ZERO,0
                     90:        .set    ONES,0xffffffff
                     91:        .set    N,8
                     92:        .set    Z,4
                     93:        .set    V,2
                     94:        .set    C,1
                     95:        .set    T,16
                     96:        .set    IV,32
                     97:        .set    FU,64
                     98:        .set    DV,128
                     99:        .set    PSWMASK,0x003f
                    100: 
                    101:        .globl  _subw3
                    102: _subw3:
                    103:        callf   $4,_setjmp      /* save context for return from error */
                    104:        movab   _subw3,_stpc    /* save subtest starting address */
                    105:        movl    $1,_subtst      /* subtest number */
                    106:        movl    $2,_no_opr      /* number of operands in use */
                    107:        movl    $SW1,_opr       /* first operand */
                    108:        movl    $MW1,_opr + 4   /* second operand */
                    109: 0:     bicpsw  $PSWMASK        /*PSW = 0                               */
                    110:        movl    $SW1,sub        /*first operand                         */
                    111:        movl    $MW1,min        /*second operand                        */
                    112:        movl    $INITW,dif      /*initialize destination                */
                    113:        bicpsw  $PSWMASK        /*PSW = 0                               */
                    114:        bispsw  $(N|V|C)        /* these flags ON                       */
                    115:        subw3   sub+2,min+2,dif+2/* try 'sub' instruction mem mem mem   */
                    116:        jlss    e1              /*error if N = 1                        */
                    117:        jneq    e1              /*error if Z = 0                        */
                    118:        jvs     e1              /*error if V = 1                        */
                    119:        jcc     e1              /*error if C = 0                        */
                    120:        jmp     1f
                    121: e1:    movpsl  _actual         /* actual = psl maybe incorrect         */
                    122:        bbs     $0,_scoplp,0b   /* if set scope loop on error */
                    123:        movl    $2,_ercode      /* error code flag failure */
                    124:        jmp     *badrtn
                    125: 1:     bicpsw  $Z
                    126:        cmpl    $RW1,dif        /*dif = expected ?                      */
                    127:        jeql    sw2             /* if no error continue */
                    128:        bbs     $0,_scoplp,0b   /* if set scope loop on error */
                    129:        movl    $1,_ercode      /* error code data miscompare */
                    130:        movl    dif,_actual     /* actual data */
                    131:        movl    $RW1,_expected  /* expected data */
                    132:        jmp     *badrtn
                    133: 
                    134: sw2:
                    135:        bbs     $0,_force_lp,0b /* if set loop on last subtest */
                    136: as2:   callf   $4,_setjmp      /* save context for return from error */
                    137:        movab   as2,_stpc       /* save subtest starting address */
                    138:        movl    $2,_subtst      /* subtest number */
                    139:        movl    $2,_no_opr      /* number of operands in use */
                    140:        movl    $SW2,_opr       /* first operand */
                    141:        movl    $MW2,_opr + 4   /* second operand */
                    142: 0:     bicpsw  $PSWMASK        /*PSW = 0                               */
                    143:        movl    $SW2,sub        /*first operand                         */
                    144:        movl    $MW2,r7         /*second operand                        */
                    145:        movl    $0,dif          /*initialize destination                */
                    146:        bicpsw  $PSWMASK        /*PSW = 0                               */
                    147:        bispsw  $(N|Z|V)        /* these flags ON                       */
                    148:        subw3   sub+2,r7,dif+2/* try 'sub' instruction mem reg mem      */
                    149:        jlss    e2              /*error if N = 1                        */
                    150:        jeql    e2              /*error if Z = 1                        */
                    151:        jvs     e2              /*error if V = 1                        */
                    152:        jcs     e2              /*error if C = 1                        */
                    153:        jmp     1f
                    154: e2:    movpsl  _actual         /* actual = psl maybe incorrect         */
                    155:        bbs     $0,_scoplp,0b   /* if set scope loop on error */
                    156:        movl    $2,_ercode      /* error code flag failure */
                    157:        jmp     *badrtn
                    158: 1:     bicpsw  $Z
                    159:        cmpl    $RW2,dif        /*dif = expected ?                      */
                    160:        jeql    sw3             /* if no error continue */
                    161:        bbs     $0,_scoplp,0b   /* if set scope loop on error */
                    162:        movl    $1,_ercode      /* error code data miscompare */
                    163:        movl    dif,_actual     /* actual data */
                    164:        movl    $RW2,_expected  /* expected data */
                    165:        jmp     *badrtn
                    166: 
                    167: sw3:
                    168:        bbs     $0,_force_lp,0b /* if set loop on last subtest */
                    169: as3:   callf   $4,_setjmp      /* save context for return from error */
                    170:        movab   as3,_stpc       /* save subtest starting address */
                    171:        movl    $3,_subtst      /* subtest number */
                    172:        movl    $2,_no_opr      /* number of operands in use */
                    173:        movl    $SW3,_opr       /* first operand */
                    174:        movl    $MW3,_opr + 4   /* second operand */
                    175: 0:     bicpsw  $PSWMASK        /*PSW = 0                               */
                    176:        movl    $SW3,r6         /*first operand                         */
                    177:        movl    $MW3,min        /*second operand                        */
                    178:        movl    $0,dif          /*initialize destination                */
                    179:        bicpsw  $PSWMASK        /*PSW = 0                               */
                    180:        bispsw  $(V|Z|C)        /* these flags ON                       */
                    181:        subw3   r6,min+2,dif+2  /* try 'sub' instruction reg mem mem    */
                    182:        jgeq    e3              /*error if N = 0                        */
                    183:        jeql    e3              /*error if Z = 1                        */
                    184:        jvs     e3              /*error if V = 1                        */
                    185:        jcc     e3              /*error if C = 0                        */
                    186:        jmp     1f
                    187: e3:    movpsl  _actual         /* actual = psl maybe incorrect         */
                    188:        bbs     $0,_scoplp,0b   /* if set scope loop on error */
                    189:        movl    $2,_ercode      /* error code flag failure */
                    190:        jmp     *badrtn
                    191: 1:     bicpsw  $Z
                    192:        cmpl    $RW3,dif        /*dif = expected ?                      */
                    193:        jeql    sw4             /* if no error continue */
                    194:        bbs     $0,_scoplp,0b   /* if set scope loop on error */
                    195:        movl    $1,_ercode      /* error code data miscompare */
                    196:        movl    dif,_actual     /* actual data */
                    197:        movl    $RW3,_expected  /* expected data */
                    198:        jmp     *badrtn
                    199:        
                    200: sw4:
                    201:        bbs     $0,_force_lp,0b /* if set loop on last subtest */
                    202: as4:   callf   $4,_setjmp      /* save context for return from error */
                    203:        movab   as4,_stpc       /* save subtest starting address */
                    204:        movl    $4,_subtst      /* subtest number */
                    205:        movl    $2,_no_opr      /* number of operands in use */
                    206:        movl    $SW4,_opr       /* first operand */
                    207:        movl    $MW4,_opr + 4   /* second operand */
                    208: 0:     bicpsw  $PSWMASK        /*PSW = 0                               */
                    209:        movl    $SW4,r6         /*first operand                         */
                    210:        movl    $MW4,r7         /*second operand                        */
                    211:        movl    $0,dif          /*initialize destination                */
                    212:        bicpsw  $PSWMASK        /*PSW = 0                               */
                    213:        bispsw  $Z              /* these flags ON                       */
                    214:        subw3   r6,r7,dif+2     /* try 'sub' instruction reg reg mem    */
                    215:        jgeq    e4              /*error if N = 0                        */
                    216:        jeql    e4              /*error if Z = 1                        */
                    217:        jvc     e4              /*error if V = 0                        */
                    218:        jcs     e4              /*error if C = 1                        */
                    219:        jmp     1f
                    220: e4:    movpsl  _actual         /* actual = psl maybe incorrect         */
                    221:        bbs     $0,_scoplp,0b   /* if set scope loop on error */
                    222:        movl    $2,_ercode      /* error code flag failure */
                    223:        jmp     *badrtn
                    224: 1:     bicpsw  $Z
                    225:        cmpl    $RW4,dif        /*dif = expected ?                      */
                    226:        jeql    sw5             /* if no error continue */
                    227:        bbs     $0,_scoplp,0b   /* if set scope loop on error */
                    228:        movl    $1,_ercode      /* error code data miscompare */
                    229:        movl    dif,_actual     /* actual data */
                    230:        movl    $RW4,_expected  /* expected data */
                    231:        jmp     *badrtn
                    232: 
                    233: sw5:
                    234:        bbs     $0,_force_lp,0b /* if set loop on last subtest */
                    235: as5:   callf   $4,_setjmp      /* save context for return from error */
                    236:        movab   as5,_stpc       /* save subtest starting address */
                    237:        movl    $5,_subtst      /* subtest number */
                    238:        movl    $2,_no_opr      /* number of operands in use */
                    239:        movl    $SW5,_opr       /* first operand */
                    240:        movl    $MW5,_opr + 4   /* second operand */
                    241: 0:     bicpsw  $PSWMASK        /*PSW = 0                               */
                    242:        movl    $SW5,r6         /*first operand                         */
                    243:        movl    $0,dif          /*initialize destination                */
                    244:        bicpsw  $PSWMASK        /*PSW = 0                               */
                    245:        bispsw  $(V|Z)          /* these flags ON                       */
                    246:        subw3   r6,$MW5,dif+2   /* try 'sub' instruction reg data mem   */
                    247:        jgeq    e5              /*error if N = 0                        */
                    248:        jeql    e5              /*error if Z = 1                        */
                    249:        jvs     e5              /*error if V = 1                        */
                    250:        jcs     e5              /*error if C = 1                        */
                    251:        jmp     1f
                    252: e5:    movpsl  _actual         /* actual = psl maybe incorrect         */
                    253:        bbs     $0,_scoplp,0b   /* if set scope loop on error */
                    254:        movl    $2,_ercode      /* error code flag failure */
                    255:        jmp     *badrtn
                    256: 1:     bicpsw  $Z
                    257:        cmpl    $RW5,dif        /*dif = expected ?                      */
                    258:        jeql    sw6             /* if no error continue */
                    259:        bbs     $0,_scoplp,0b   /* if set scope loop on error */
                    260:        movl    $1,_ercode      /* error code data miscompare */
                    261:        movl    dif,_actual     /* actual data */
                    262:        movl    $RW5,_expected  /* expected data */
                    263:        jmp     *badrtn
                    264: 
                    265: sw6:
                    266:        bbs     $0,_force_lp,0b /* if set loop on last subtest */
                    267: as6:   callf   $4,_setjmp      /* save context for return from error */
                    268:        movab   as6,_stpc       /* save subtest starting address */
                    269:        movl    $6,_subtst      /* subtest number */
                    270:        movl    $2,_no_opr      /* number of operands in use */
                    271:        movl    $SW6,_opr       /* first operand */
                    272:        movl    $MW6,_opr + 4   /* second operand */
                    273: 0:     bicpsw  $PSWMASK        /*PSW = 0                               */
                    274:        movl    $SW6,sub        /*first operand                         */
                    275:        movl    $MW6,r7         /*second operand                        */
                    276:        movl    $0,dif          /*initialize destination                */
                    277:        bicpsw  $PSWMASK        /*PSW = 0                               */
                    278:        bispsw  $(Z|C|N)        /* these flags ON                       */
                    279:        subw3   $SW6,r7,dif+2   /* try 'sub' instruction data reg mem   */
                    280:        jlss    e6              /*error if N = 1                        */
                    281:        jeql    e6              /*error if Z = 1                        */
                    282:        jvc     e6              /*error if V = 0                        */
                    283:        jcc     e6              /*error if C = 0                        */
                    284:        jmp     1f
                    285: e6:    movpsl  _actual         /* actual = psl maybe incorrect         */
                    286:        bbs     $0,_scoplp,0b   /* if set scope loop on error */
                    287:        movl    $2,_ercode      /* error code flag failure */
                    288:        jmp     *badrtn
                    289: 1:     bicpsw  $Z
                    290:        cmpl    $RW6,dif        /*dif = expected ?                      */
                    291:        jeql    sw7             /* if no error continue */
                    292:        bbs     $0,_scoplp,0b   /* if set scope loop on error */
                    293:        movl    $1,_ercode      /* error code data miscompare */
                    294:        movl    dif,_actual     /* actual data */
                    295:        movl    $RW6,_expected  /* expected data */
                    296:        jmp     *badrtn
                    297: 
                    298: sw7:
                    299:        bbs     $0,_force_lp,0b /* if set loop on last subtest */
                    300: as7:   callf   $4,_setjmp      /* save context for return from error */
                    301:        movab   as7,_stpc       /* save subtest starting address */
                    302:        movl    $7,_subtst      /* subtest number */
                    303:        movl    $2,_no_opr      /* number of operands in use */
                    304:        movl    $SW1,_opr       /* first operand */
                    305:        movl    $MW1,_opr + 4   /* second operand */
                    306: 0:     bicpsw  $PSWMASK        /*PSW = 0                               */
                    307:        movl    $SW1,r6         /*first operand                         */
                    308:        movl    $MW1,r7         /*second operand                        */
                    309:        movl    $INITW,r8       /*initialize destination                */
                    310:        bicpsw  $PSWMASK        /*PSW = 0                               */
                    311:        bispsw  $(N|V|C)        /* these flags ON                       */
                    312:        subw3   r6,r7,r8        /* try 'sub' instruction mem mem mem    */
                    313:        jlss    e7              /*error if N = 1                        */
                    314:        jneq    e7              /*error if Z = 0                        */
                    315:        jvs     e7              /*error if V = 1                        */
                    316:        jcc     e7              /*error if C = 0                        */
                    317:        jmp     1f
                    318: e7:    movpsl  _actual         /* actual = psl maybe incorrect         */
                    319:        bbs     $0,_scoplp,0b   /* if set scope loop on error */
                    320:        movl    $2,_ercode      /* error code flag failure */
                    321:        jmp     *badrtn
                    322: 1:     bicpsw  $Z
                    323:        cmpl    $0x00,r8        /*r8 = expected ?                       */
                    324:        jeql    sw8             /* if no error continue */
                    325:        bbs     $0,_scoplp,0b   /* if set scope loop on error */
                    326:        movl    $1,_ercode      /* error code data miscompare */
                    327:        movl    r8,_actual      /* actual data */
                    328:        movl    $0,_expected    /* expected data */
                    329:        jmp     *badrtn
                    330: 
                    331: sw8:
                    332:        bbs     $0,_force_lp,0b /* if set loop on last subtest */
                    333: as8:   callf   $4,_setjmp      /* save context for return from error */
                    334:        movab   as8,_stpc       /* save subtest starting address */
                    335:        movl    $8,_subtst      /* subtest number */
                    336:        movl    $2,_no_opr      /* number of operands in use */
                    337:        movl    $SW1,_opr       /* first operand */
                    338:        movl    $MW1,_opr + 4   /* second operand */
                    339: 0:     bicpsw  $PSWMASK        /*PSW = 0                               */
                    340:        movl    $SW1,r6         /*first operand                         */
                    341:        movl    $MW1,min        /*second operand                        */
                    342:        movl    $INITW,r8       /*initialize destination                */
                    343:        bicpsw  $PSWMASK        /*PSW = 0                               */
                    344:        bispsw  $(N|V|C)        /* these flags ON                       */
                    345:        subw3   r6,min+2,r8     /* try 'sub' instruction reg mem reg    */
                    346:        jgeq    e8              /*error if N = 1                        */
                    347:        jeql    e8              /*error if Z = 0                        */
                    348:        jvs     e8              /*error if V = 1                        */
                    349:        jcs     e8              /*error if C = 0                        */
                    350:        jmp     1f
                    351: e8:    movpsl  _actual         /* actual = psl maybe incorrect         */
                    352:        bbs     $0,_scoplp,0b   /* if set scope loop on error */
                    353:        movl    $2,_ercode      /* error code flag failure */
                    354:        jmp     *badrtn
                    355: 1:     bicpsw  $Z
                    356:        cmpl    $0xeee10000,r8          /*r8 = expected ?               */
                    357:        jeql    sw9             /* if no error continue */
                    358:        bbs     $0,_scoplp,0b   /* if set scope loop on error */
                    359:        movl    $1,_ercode      /* error code data miscompare */
                    360:        movl    r8,_actual      /* actual data */
                    361:        movl    $0xeee10000,_expected   /* expected data */
                    362:        jmp     *badrtn
                    363: 
                    364: sw9:
                    365:        bbs     $0,_force_lp,0b /* if set loop on last subtest */
                    366: as9:   callf   $4,_setjmp      /* save context for return from error */
                    367:        movab   as9,_stpc       /* save subtest starting address */
                    368:        movl    $9,_subtst      /* subtest number */
                    369:        movl    $2,_no_opr      /* number of operands in use */
                    370:        movl    $SW1,_opr       /* first operand */
                    371:        movl    $MW1,_opr + 4   /* second operand */
                    372: 0:     bicpsw  $PSWMASK        /*PSW = 0                               */
                    373:        movl    $SW1,r6         /*first operand                         */
                    374:        movl    $INITW,r8       /*initialize destination                */
                    375:        bicpsw  $PSWMASK        /*PSW = 0                               */
                    376:        bispsw  $(N|V|C)        /* these flags ON                       */
                    377:        subw3   r6,$MW1,r8      /* try 'sub' instruction reg data reg   */
                    378:        jlss    e9              /*error if N = 1                        */
                    379:        jneq    e9              /*error if Z = 0                        */
                    380:        jvs     e9              /*error if V = 1                        */
                    381:        jcc     e9              /*error if C = 0                        */
                    382:        jmp     1f
                    383: e9:    movpsl  _actual         /* actual = psl maybe incorrect         */
                    384:        bbs     $0,_scoplp,0b   /* if set scope loop on error */
                    385:        movl    $2,_ercode      /* error code flag failure */
                    386:        jmp     *badrtn
                    387: 1:     bicpsw  $Z
                    388:        cmpl    $0x00,r8        /*r8 = expected ?                       */
                    389:        jeql    sw10            /* if no error continue */
                    390:        bbs     $0,_scoplp,0b   /* if set scope loop on error */
                    391:        movl    $1,_ercode      /* error code data miscompare */
                    392:        movl    r8,_actual      /* actual data */
                    393:        movl    $0,_expected    /* expected data */
                    394:        jmp     *badrtn
                    395: 
                    396: sw10:
                    397:        bbs     $0,_force_lp,0b /* if set loop on last subtest */
                    398: as10:  callf   $4,_setjmp      /* save context for return from error */
                    399:        movab   as10,_stpc      /* save subtest starting address */
                    400:        movl    $0xa,_subtst    /* subtest number */
                    401:        movl    $2,_no_opr      /* number of operands in use */
                    402:        movl    $SW1,_opr       /* first operand */
                    403:        movl    $MW1,_opr + 4   /* second operand */
                    404: 0:     bicpsw  $PSWMASK        /*PSW = 0                               */
                    405:        movl    $SW1,sub        /*first operand                         */
                    406:        movl    $MW1,r7         /*second operand                        */
                    407:        movl    $INITW,r8       /*initialize destination                */
                    408:        bicpsw  $PSWMASK        /*PSW = 0                               */
                    409:        bispsw  $(N|V|C)        /* these flags ON                       */
                    410:        subw3   sub+2,r7,r8     /* try 'sub' instruction mem reg reg    */
                    411:        jlss    e10             /*error if N = 1                        */
                    412:        jeql    e10             /*error if Z = 0                        */
                    413:        jvs     e10             /*error if V = 1                        */
                    414:        jcc     e10             /*error if C = 0                        */
                    415:        jmp     1f
                    416: e10:   movpsl  _actual         /* actual = psl maybe incorrect         */
                    417:        bbs     $0,_scoplp,0b   /* if set scope loop on error */
                    418:        movl    $2,_ercode      /* error code flag failure */
                    419:        jmp     *badrtn
                    420: 1:     bicpsw  $Z
                    421:        cmpl    $RW1,r8         /*r8 = expected ?                       */
                    422:        jeql    sw11            /* if no error continue */
                    423:        bbs     $0,_scoplp,0b   /* if set scope loop on error */
                    424:        movl    $1,_ercode      /* error code data miscompare */
                    425:        movl    r8,_actual      /* actual data */
                    426:        movl    $RW1,_expected  /* expected data */
                    427:        jmp     *badrtn
                    428: 
                    429: 
                    430: sw11:
                    431:        bbs     $0,_force_lp,0b /* if set loop on last subtest */
                    432: as11:  callf   $4,_setjmp      /* save context for return from error */
                    433:        movab   as11,_stpc      /* save subtest starting address */
                    434:        movl    $0xb,_subtst    /* subtest number */
                    435:        movl    $2,_no_opr      /* number of operands in use */
                    436:        movl    $SW1,_opr       /* first operand */
                    437:        movl    $MW1,_opr + 4   /* second operand */
                    438: 0:     bicpsw  $PSWMASK        /*PSW = 0                               */
                    439:        movl    $SW1,r6         /*first operand                         */
                    440:        movl    $MW1,r7         /*second operand                        */
                    441:        movl    $INITW,r8       /*initialize destination                */
                    442:        bicpsw  $PSWMASK        /*PSW = 0                               */
                    443:        bispsw  $(N|V|C)        /* these flags ON                       */
                    444:        subw3   $SW1,r7,r8      /* try 'sub' instruction data reg reg   */
                    445:        jlss    e11             /*error if N = 1                        */
                    446:        jneq    e11             /*error if Z = 0                        */
                    447:        jvs     e11             /*error if V = 1                        */
                    448:        jcc     e11             /*error if C = 0                        */
                    449:        jmp     1f
                    450: e11:   movpsl  _actual         /* actual = psl maybe incorrect         */
                    451:        bbs     $0,_scoplp,0b   /* if set scope loop on error */
                    452:        movl    $2,_ercode      /* error code flag failure */
                    453:        jmp     *badrtn
                    454: 1:     bicpsw  $Z
                    455:        cmpl    $0x00,r8        /*r8 = expected ?                       */
                    456:        jeql    sw12            /* if no error continue */
                    457:        bbs     $0,_scoplp,0b   /* if set scope loop on error */
                    458:        movl    $1,_ercode      /* error code data miscompare */
                    459:        movl    r8,_actual      /* actual data */
                    460:        movl    $0,_expected    /* expected data */
                    461:        jmp     *badrtn
                    462: 
                    463: 
                    464: sw12:
                    465:        bbs     $0,_force_lp,0b /* if set loop on last subtest */
                    466: as12:  callf   $4,_setjmp      /* save context for return from error */
                    467:        movab   as12,_stpc      /* save subtest starting address */
                    468:        movl    $0xc,_subtst    /* subtest number */
                    469:        movl    $2,_no_opr      /* number of operands in use */
                    470:        movl    $SW1,_opr       /* first operand */
                    471:        movl    $MW1,_opr + 4   /* second operand */
                    472: 0:     bicpsw  $PSWMASK        /*PSW = 0                               */
                    473:        movl    $INITW,r8       /*initialize destination                */
                    474:        bicpsw  $PSWMASK        /*PSW = 0                               */
                    475:        bispsw  $(N|V|C)        /* these flags ON                       */
                    476:        subw3   $SW1,$MW1,r8    /* try 'sub' instruction data data reg  */
                    477:        jlss    e12             /*error if N = 1                        */
                    478:        jneq    e12             /*error if Z = 0                        */
                    479:        jvs     e12             /*error if V = 1                        */
                    480:        jcc     e12             /*error if C = 0                        */
                    481:        jmp     1f
                    482: e12:   movpsl  _actual         /* actual = psl maybe incorrect         */
                    483:        bbs     $0,_scoplp,0b   /* if set scope loop on error */
                    484:        movl    $2,_ercode      /* error code flag failure */
                    485:        jmp     *badrtn
                    486: 1:     bicpsw  $Z
                    487:        cmpl    $0x00,r8        /*r8 = expected ?                       */
                    488:        jeql    aldn            /* if no error continue */
                    489:        bbs     $0,_scoplp,0b   /* if set scope loop on error */
                    490:        movl    $1,_ercode      /* error code data miscompare */
                    491:        movl    r8,_actual      /* actual data */
                    492:        movl    $0,_expected    /* expected data */
                    493:        jmp     *badrtn
                    494: 
                    495: aldn:  bbs     $0,_force_lp,0b /* if set loop on last subtest */
                    496:        jmp     *return
                    497: 
                    498: 
                    499: /*                                                                     */
                    500: /*     Variables                                                       */
                    501: /*                                                                     */
                    502:        .align  2
                    503: min:   .space  4
                    504: dif:   .space  4
                    505: sub:   .space  4
                    506: 
                    507: /*     End of file                                                     */
                    508: 
                    509: 

unix.superglobalmegacorp.com

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