
<
2
.75
7UGT U/CPWCN
#FFTGUU5RCEG
=L/2*
7/<:
SBC
Subtract with Carry
Instruction Format:
SBC dst, src
Operation:
dst
←
dst - src - C
The value of the source operand, and the value of the
C
flag, are subtracted from the destination operand. The
result is stored in the destination operand. The contents of the source operand do not change. Subtraction is
performed by adding the two’s complement of the source operand to the destination operand. In multiple
precision arithmetic, this instruction permits the carry (borrow) from the subtraction of low-order operands
to be subtracted from the subtraction of high-order operands.
Flags:
When the instruction is executed, the flags are set as follows:
C:
0 if a value is carried from the most significant bit of the result; otherwise, 1 (indicating a borrow).
Z:
1 if the result is
0
; otherwise, 0.
V:
1 if an arithmetic overflow occurs (the operands have opposite signs, and the sign of the result is
the same as the sign of the source); otherwise, 0.
S:
1 if bit
7
of the result is 1; otherwise, 0.
H:
0 if if a value is carried from the most significant bit of the low-order four bits of the result;
otherwise, 1 (indicating a borrow).
D:
1.
OPC
dst
src
OPC
src
dst
OPC
dst
src
OPC (Hex)
Address Mode
dst src
32
33
r
r
r
Ir
34
35
R
R
R
IR
36
37
R
IR
IM
IM