English
Language : 

DR805X Datasheet, PDF (72/79 Pages) Digital Core Design – 8-bit RISC Microcontroller Instructions set details ver 3.10
DR805x Instructions set details
3.40. SUBB
- 72 -
Instruction: SUBB A, <src-byte>
Function: Subtract with borrow
Description:
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.
3.40.1.
SUBB A, RN
Operation: (PC) ← (PC) + 1
(A) ← (A) - (C) - (Rn)
Bytes:
1
Cycles:
2
Encoding:
10011 r r r
3.40.2.
SUBB A, DIRECT
Operation: (PC) ← (PC) + 2
(A) ← (A) - (C) - (direct)
Bytes:
2
Cycles:
3
Encoding:
10010101
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.