English
Language : 

GMS30C2116 Datasheet, PDF (178/322 Pages) Hynix Semiconductor – USERS MANUAL
A-4
ADD Immediate
Appendix A. Instruction Set Details
ADDI
Format:
Rimm format
15
10 9 8 7
43
0
OP-code
dn
Rd-code
n
0100 10
imm1
imm2
d = 0: Rd-code encoded G0..G15 for Rd
d = 1: Rd-code encoded L0..L15 for Rd
n: bit 8 // bit 3..0 encode n = 0..31, see Table 2.3 Encoding of Immediate Values
Notation:
ADDI Rd, imm
ADDI Rd, CZ (when n = 0 )
Description:
The immediate operand (imm) is added to the destination operand (Rd), the result is placed
in the destination register (Rd) and the condition flag are set or cleared accordingly.
Both operands and the result are interpreted as either all signed or all unsigned integers.
When the immediate value n = 0, C is only added to the destination operand if Z = 0 or
Rd(0) is one (round to even).
Operation:
When n is not zero
Rd := Rd + imm;
Z := Rd = 0;
N := Rd(31);
V := overflow;
C := carry;
When n is zero
Rd := Rd + (C and (Z=0 or Rd(0)));
Z := Rd = 0
N := Rd(31);
V := overflow;
C := carry;
Exceptions:
None.