S2     JOB   TEST OVERFLOW CONDITIONS (SUBTRACT)
       ORG   500
START  CS    332
       CS
       MLCWA @TEST OF OVERFLOW CONDITIONS (SUBTRACT)@,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
       MLCWA ADD
       W
       CS    299
       S     ONE,VN99
       MLCWA VN99,280
       MLCWA GOT
       MLCWA @99@
       MLCWA EXPECT
       MLCWA SUB
       W
       CS    299
*      CHECK OVERFLOW OF A-BIT TO B-BIT
       A     ONE,VA99
       MLCWA VA99,280
       MLCWA GOT
       MLCWA @!0@
       MLCWA EXPECT
       MLCWA ADD
       W
       S     ONE,VA99
       MLCWA VA99,280
       MLCWA GOT
       MLCWA @Z9@
       MLCWA EXPECT
       MLCWA SUB
       W
       CS    299
* CHECK OVERFLOW OF B-BIT TO AB-BIT
       A     ONE,VB99
       MLCWA VB99,280
       MLCWA GOT
       MLCWA @?0@
       MLCWA EXPECT
       MLCWA ADD
       W
       CS    299
       S     ONE,VB99
       MLCWA VB99,280
       MLCWA GOT
       MLCWA @R9@
       MLCWA EXPECT
       MLCWA SUB
       W
       CS    299
* CHECK OVERFLOW OF AB-BIT TO NO-BIT
       A     ONE,VAB99
       MLCWA VAB99,280
       MLCWA GOT
       MLCWA @00@
       MLCWA EXPECT
       MLCWA ADD
       W
       CS    299
       S     ONE,VAB99
       MLCWA VAB99,280
       MLCWA GOT
       MLCWA @I9@
       MLCWA EXPECT
       MLCWA SUB
* CHECK COMPLEX OVERFLOW
       A     C2,C1
       MLCWA C1,280
       MLCWA GOT
       MLCWA @?0@
       MLCWA EXPECT
       MLCWA ADD
       W
       CS    299
       S     C2,C1
       MLCWA C1,280
       MLCWA GOT
       MLCWA @Z9@
       MLCWA EXPECT
       MLCWA SUB
       W
       CS    299
       H     *-3
VN99   DCW   99
VA99   DCW   @Z9@
VB99   DCW   @R9@
VAB99  DCW   @I9@
ONE    DCW   01
C1     DCW   @Z9@
C2     DCW   @Ø1@
GOT    DCW   @, GOT: @
EXPECT DCW   @EXPECTED @
ADD    DCW   @ADD: @
SUB    DCW   @SUB: @
       END   START
