A2     JOB   TEST OVERFLOW CONDITIONS (ADD)
       ORG   500
START  CS    332
       CS
       MLCWA @TEST OF OVERFLOW CONDITIONS (ADD)@,250
       W
       CS    299
       MLCWA @---------------------------------@,250
       W
       CS    299
       H
* CHECK OVERFLOW OF NO-BIT TO A-BIT
       A     ONE,VN99
       MLCWA VN99,280
       MLCWA GOT
       MLCWA @Ø0@
       MLCWA EXPECT
       W
       CS    299
*      CHECK BRANCH-ON-OVERFLOW INSTRUCTION
       BAV   OVF
       MLCWA @***** OVERFLOW BRANCH FAILED@,250
       W     
       CS    299
       B     NEXT
OVF    MLCWA @OVERFLOW BRANCH SUCCEEDED@,250
       W
       CS    299
       BAV   OVF2
       B     OVFOFF
OVF2   MLCWA @***** OVERFLOW BRANCH DID NOT RESET INDICATOR@,250
       W
       CS    299
       B     NEXT
OVFOFF MLCWA @OVERFLOW PROPERLY RESET INDICATOR@,250
       W
       CS    299
*      CHECK OVERFLOW OF A-BIT TO B-BIT
NEXT   A     ONE,VA99
       MLCWA VA99,280
       MLCWA GOT
       MLCWA @!0@
       MLCWA EXPECT
       W
       CS    299
* CHECK OVERFLOW OF B-BIT TO AB-BIT
       A     ONE,VB99
       MLCWA VB99,280
       MLCWA GOT
       MLCWA @?0@
       MLCWA EXPECT
       W
       CS    299
* CHECK OVERFLOW OF AB-BIT TO NO-BIT
       A     ONE,VAB99
       MLCWA VAB99,280
       MLCWA GOT
       MLCWA @00@
       MLCWA EXPECT
       W
       CS    299
       H
       H     *-3
VN99   DCW   99
VA99   DCW   @Z9@
VB99   DCW   @R9@
VAB99  DCW   @I9@
ONE    DCW   01
GOT    DCW   @, GOT: @
EXPECT DCW   @EXPECTED @
       END   START
