The 8051 Instruction Set
Atmel 8051 Microcontrollers Hardware Manual 1-26
4316B–8051–02/04
1.14.3 ADDC A, <src-byte>
Function: Add with Carry
Description: ADDC simultaneously adds the byte variable indicated, the carry flag and the Accumulator contents, leaving the
result in the Accumulator. The carry and auxiliary-carry flags are set respectively, if there is a carry-out from bit 7
or bit 3, and cleared otherwise. When adding unsigned integers, the carry flag indicates an overflow occurred.
OV is set if there is a carry-out of bit 6 but not out of bit 7, or a carry-out of bit 7 but not out of bit 6; otherwise OV
is cleared. When adding signed integers, OV indicates a negative number produced as the sum of two positive
operands or a positive sum from two negative operands.
Four source operand addressing modes are allowed: register, direct, register-indirect, or immediate.
Example: The Accumulator holds 0C3H (11000011B) and register 0 holds 0AAH (10101010B) with the carry flag set. The
following instruction,
ADDC A,R0
leaves 6EH (01101110B) in the Accumulator with AC cleared and both the Carry flag and OV set to 1.
ADDC A,R
n
Bytes: 1
Cycles: 1
Encoding: 00111r r r
Operation: ADDC
(A) ← (A) + (C) + (R
n
)
ADDC A,direct
Bytes: 2
Cycles: 1
Encoding: 00110101 direct address
Operation: ADDC
(A) ← (A) + (C) + (direct)
ADDC A,@R
i
Bytes: 1
Cycles: 1
Encoding: 0011011 i
Operation: ADDC
(A) ← (A) + (C) + ((R
i
))
ADDC A,#data
Bytes: 2
Cycles: 1
Encoding: 00110100 immediate data
Operation: ADDC
(A) ← (A) + (C) + #data