ADD Instruction



Adds two binary operands and stores the result in the destination operand.

Two different methods are allowed:

1. Add an effective address to a data register.
2. Add a data register to an effective address.



ADDRESS METHODS: 1) Dn, An, (An), (An)+, -(An), x(An), x(An,xr.s), x.w, x.l, x(PC), x(PC,xr.s), #x

ADDRESS METHODS: 2) (An), (An)+, -(An), x(An), x(An,xr.s), x.w, x.l

DATA LENGTH: Byte, word, longword

When using an address register as destination, byte is not allowed.

FLAGS: X - Set if carry from the most significant bit, else cleared.
N - S
Z - S
C - Same as X
V - S

 

SYNTAX: ADD Dn,<ea>
ADD <ea>,Dn

EXAMPLE CODE:   

   ADD.B     D0,D1      adds the lower 8 bits of D0 to D1, does not change the upper 24 bits of D0 or D1
   ADD.W    D0,D1      adds the lower 16 bits of D0 to D1, does not change the upper 16 bits of D0 or D1
   ADD.L     D0,D1       adds all 32 bits of D0 to D1