English
Language : 

GMS30C2116 Datasheet, PDF (312/322 Pages) Hynix Semiconductor – USERS MANUAL
A-138
Subtract with Borrow
Appendix A. Instruction Set Details
SUBC
Format:
RR format
15
OP-code
0100 00
9 87
43
0
ds
Rd-code
Rs-code
s = 0: Rs-code encodes G0..G15 for Rs
s = 1: Rs-code encodes L0..L15 for Rs
d = 0: Rd-code encodes G0..G15 for Rd
d = 1: Rd-code encodes L0..L15 for Rd
Notation:
SUBC Rd, Rs
SUBC Rd, C (When SR is denoted as a source operand)
Description:
The source operand + C is subtracted form the destination operand, the result is placed in
the destination register and the condition flags are set or cleared accordingly.
Both operands and the result are interpreted as either all signed or all unsigned integers.
When the SR is denoted as a source operand, C is subtracted instead of the SR.
Operation:
When Rs does not denote SR
Rd := Rd - (Rs + C);
Z := Z and (Rd = 0);
N := Rd(31);
V := overflow;
C := borrow;
When Rs denotes SR
Rd := Rd - C;
Z := Z and (Rd = 0);
N := Rd(31);
V := overflow;
C := borrow;
Exceptions:
None.