Next: Add Halfword Up: Instructions Previous: Instructions

Add

The second operand is added to the first operand, and the sum is placed in the first-operand location.

Addition is performed by adding all 32 bits of both operands. If the carry out of the sign-bit position and the carry out of the high-order numeric bit position agree, the sum is satisfactory; if they disagree, an overflow occurs. The sign bit is not changed after the overflow. A positive overflow yields a negative final sum, and a negative overflow results in ; positive sum. The overflow causes a program interruption when the fixed-point overflow mask bit is one.

Resulting Condition Code:
0 ~ Sum is zero
1 ~ Sum is less than zero
2 ~ Sum is greater than zero
3 ~ Overflow
Program Exceptions:
Access (fetch, operand 2 of A only)
Fixed-Point Overflow
Programming Note:
In two's-complement notation a zero result is always positive.

Relevant Extended Mnemonic Instructions:


Mnemonic     Meaning                 Op Code 
BO or BOR    Branch on Overflow	     BC or BCR 1 
BP or BPR    Branch on Plus          BC or BCR 2 
BM or BMR    Branch on Minus         BC or BCR 4 
BNP or BNPR  Branch on Not Plus      BC or BCR 13
BNM or BNMR  Branch on Not Minus     BC or BCR 11
BNZ or BNZR  Branch on Not Zero      BC or BCR 7 
BZ or BZR  Branch on Zero            BC or BCR 8



Next: Add Halfword Up: Instructions Previous: Instructions


A.Daviel,TRIUMF