DR805x Instructions set details
- 72 -
3.40.
SUBB
SUBB A, <src-byte>
Subtract with borrow
SUBB subtracts the indicated variable and the carry flag together from
the accumulator, leaving the result in the accumulator. SUBB sets the
carry (borrow) flag if a borrow is needed for bit 7, and clears C
otherwise. (If C was set
before
executing a SUBB instruction, this
indicates that a borrow was needed for the previous step in a multiple
precision subtraction, so the carry is subtracted from the accumulator
along with the source operand). AC is set if a borrow is needed for bit 3,
and cleared otherwise. OV is set if a borrow is needed into bit 6 but not
into bit 7, or into bit 7 but not bit 6.
When subtracting signed integers OV indicates a negative number
produced when a negative value is subtracted from a positive value, or
a positive result when a positive number is subtracted from a negative
number.
The source operand allows four addressing modes: register, direct,
register-indirect, or immediate.
SUBB A, R
N
(PC)
←
(PC) + 1
(A)
←
(A) - (C) - (Rn)
1
2
Instruction:
Function:
Description:
3.40.1.
Operation:
Bytes:
Cycles:
Encoding:
1
0
0
1
1
r
r
r
3.40.2.
Operation:
SUBB A,
DIRECT
(PC)
←
(PC) + 2
(A)
←
(A) - (C) - (direct)
2
3
Bytes:
Cycles:
Encoding:
1
0
0
1
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.