The Add instruction performs 2s complement binary addition. Operand 1 is a register containing a fullword integer. Operand 2 specifies a fullword in memory. The fullword in memory is added to the fullword in the register and the result is stored in the register. The fullword in memory is not changed. Consider the following example,

 

A R9,AFIELD

 

The contents of the fullword AFIELD, x0000000A = 10, are added to register 9 which contains x00000025 = 37. The sum is 47 = x0000002F and destroys the previous value in R9. The fullword in memory is unchanged by this operation.

 

Since A is an RX instruction, an index register may be coded as part of operand 2 (see Explicit Addressing).

 

Some Unrelated Adds

 

R4 = XFFFFFFFE -2 IN 2S COMPLEMENT

R5 = X00000028 +40 IN 2S COMPLEMENT

R6 = X00000004 +4 IN 2S COMPLEMENT

DOG DC F4

CAT DC F-4

 

A R4,=F20 R4 = X00000012 = +18

A R5,=F20 R5 = X0000003C = +60

A R6,=F20 R6 = X00000018 = +24

A R6,=F-5 R6 = XFFFFFFFF = -1

A R6,CAT R6 = X00000000 = 0

A R6,DOG R6 = X00000008 = +8

A R6,DOG(R6) R6 = X00000000 INDEXING IS ALLOWED