English
Language : 

GMS30C2116 Datasheet, PDF (311/322 Pages) Hynix Semiconductor – USERS MANUAL
Appendix A. Instruction Set Details
Subtract
A-137
SUB
Format:
RR format
15
OP-code
0100 10
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:
SUB Rd, Rs
SUB Rd, C (When SR is denoted as a source operand)
Description:
The source operand 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;
Z := Rd = 0;
N := Rd(31);
V := overflow;
C := borrow;
When Rs denotes SR
Rd := Rd - C;
Z := Rd = 0;
N := Rd(31);
V := overflow;
C := borrow;
Exceptions:
None.