2.2.31 (2) INC (W)
INC (INCrement)
Increment
Description
This instruction adds the immediate value 1 or 2 to the contents of a 16-bit register Rd
(destination register) and stores the result in the 16-bit register Rd.
Available Registers
Rd: R0 to R7, E0 to E7
Operand Format and Number of States Required for Execution
Notes
An overflow is caused by the operations H'7FFF + 1
→
H'8000, H'7FFF + 2
→
H'8001, and
H'7FFE + 2
→
H'8000.
Instruction Format
1st byte
2nd byte
3rd byte
4th byte
Register direct
INC.W
#1, Rd
0
B
5
rd
2
Register direct
INC.W
#2, Rd
0
B
D
rd
2
No. of
States
Addressing
Mode
Mnemonic
Operands
Operation
Rd + 1
→
Rd
Rd + 2
→
Rd
Assembly-Language Format
INC.W #1,
Rd
INC.W #2,
Rd
Operand Size
Word
Condition Code
H: Previous value remains unchanged.
N: Set to 1 if the result is negative; otherwise
cleared to 0.
Z: Set to 1 if the result is zero; otherwise
cleared to 0.
V: Set to 1 if an overflow occurs; otherwise
cleared to 0.
C: Previous value remains unchanged.
I
UI
H
U
N
Z
V
C
—
—
—
—
↕
↕
↕
—
103