English
Language : 

SAB80515 Datasheet, PDF (137/270 Pages) Siemens Semiconductor Group – 8-Bit Single-Chip Microcontroller Family
Instruction Set
ADD
A, <src-byte>
Function:
Add
Description:
ADD adds the byte variable indicated to the accumulator, leaving the result in the
accumulator. The carry and auxiliary carry flags are set, respectively, if there is a
carry out of 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).
The instruction
ADD A,R0
will leave 6DH (01101101B) in the accumulator with the AC flag cleared and both
the carry flag and OV set to 1.
ADD
A,Rn
Operation:
ADD
(A) ← (A) + (Rn)
Encoding:
Bytes:
Cycles:
0010 1rrr
1
1
ADD
A,direct
Operation:
ADD
(A) ← (A) + (direct)
Encoding:
Bytes:
Cycles:
0010 0101
2
1
direct address
Semiconductor Group
137