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]
|
|
|
|
|
ADC src, dest
|
|
#SIMM:8
|
Rd
|
|
|
#SIMM:16
|
Rd
|
|
|
#SIMM:24
|
Rd
|
|
|
#IMM:32
|
Rd
|
|
|
Rs
|
Rd
|
|
|
[Rs].L
|
Rd
|
|
|
dsp:8[Rs].L
|
Rd
|
|
|
dsp:16[Rs].L
|
Rd
|
|
[Flag 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