ADC

Add with carry

ADC

ADd with Carry


[Syntax]

ADC src, dest

[Operation]

dest = dest + src + C;

 

[Function]

-

This instruction adds dest, src, and the C flag and places the result in dest.

 

[Instruction Format]

Syntax

Processng Size

src

dest

Code size

(Byte)

ADC src, dest

L

#SIMM:8

Rd

4

L

#SIMM:16

Rd

5

L

#SIMM:24

Rd

6

L

#IMM:32

Rd

7

L

Rs

Rd

3

L

[Rs].L

Rd

4

L

dsp:8[Rs].L

Rd

5

L

dsp:16[Rs].L

Rd

6

 

[Flag Change]

Flag

C

Z

S

O

Change

 

 

 

 

Conditions

C : The flag is set if an unsigned operation produces an overflow; otherwise it is cleared.

Z : The flag is set if dest is 0 after the operation; otherwise it is cleared.

S : The flag is set if the MSB of dest after the operation is 1; otherwise it is cleared.

O : The flag is set if a signed operation produces an overflow; otherwise it is cleared.

 

[Description Example]

ADC #127, R2

ADC R1, R2

ADC [R1], R2