Z8 Microcontrollers
ZiLOG
Instruction Descriptions and Formats
UM001600-Z8X0599
12-35
INCW
INCREMENT WORD
INCW
Increment Word
INCW dst
Instruction Format:
Operation:
dst <— dst - 1
The contents of the destination (which must be an even address) operand is decremented by one. The
destination operand can be a Register Pair or a Working Register Pair.
Note:
Address modes RR or IR can be used to specify a 4-bit Working Register Pair. In this format, the
destination Working Register Pair operand is specified by adding 1110B (EH) to the high nibble of the
operand. For example, if Working Register Pair R12 (CH) is the destination operand, then ECH will be
used as the destination operand in the Op Code
Example:
If Register Pairs 30H and 31H contain the value 0AF2H, the statement:
INCW 30H
Op Code: A0 30
leaves the value 0AF3H in Register Pair 30H and 31H. The Z, V, and S Flags are cleared.
Example:
If Working Register R0 contains 30H, and Register Pairs 30H and 31H contain the value FAF3H, the
statement:
INCW @R0
Op Code: A1 E0
leaves the value FAF4H in Register Pair 30H and 31H. The S Flag is set, and the Z and V Flags are
cleared.
OPC
dst
Cycles
OPC
(Hex)
Address Mode
dst
10
10
10
A0
A1
A0
RR
IR
R
Flags:
C:
Z:
S:
V:
D:
H:
Unaffected
Set if the result is zero; cleared otherwise.
Set if the result of bit 7 is set (negative); cleared otherwise.
Set if arithmetic overflow occurs; cleared otherwise.
Unaffected
Unaffected
E
dst