DR805x Instructions set details
- 15 -
3.2.
ADD
Instruction:
Function:
ADD A, <src-byte>
Adds A to the source operand and returns the result to A.
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.
3.2.1. ADD A, RN
Operation: (PC) ← (PC) + 1
(A) ← (A) + (Rn)
Bytes:
Cycles:
1
2
Encoding:
0
0
1
0
1
r
r
r
3.2.2. ADD A, DIRECT
Operation: (PC) ← (PC) + 2
(A) ← (A) + (direct)
Bytes:
Cycles:
2
3
Encoding:
0
0
1
0
0
1
0
1
direct address
All trademarks mentioned in this document
are trademarks of their respective owners.
http://www.DigitalCoreDesign.com
http://www.dcd.pl
Copyright 1999-2003 DCD – Digital Core Design. All Rights Reserved.