KS86C6004/C6008/P6008 MICROCONTROLLER (Preliminary Spec)
SAM87RI INSTRUCTION SET
6–23
INC
— Increment
INC
dst
Operation:
dst
←
dst + 1
The contents of the destination operand are incremented by one.
Flags:
C: Unaffected.
Z: Set if the result is "0"; cleared otherwise.
S: Set if the result is negative; cleared otherwise.
V: Set if arithmetic overflow occurred, that is dst value is +127(7FH) and result is –128(80H);
cleared otherwise.
D: Unaffected.
H: Unaffected.
Format:
Bytes
Cycles
Opcode
(Hex)
Addr Mode
dst
dst | opc
1
6
rE
r
r = 0 to
F
opc
dst
2
6
20
R
21
IR
Examples:
Given: R0 = 1BH, register 00H = 0CH, and register 1BH = 0FH:
INC
R0
→
R0 = 1CH
INC
00H
→
Register 00H = 0DH
INC
@R0
→
R0 = 1BH, register 01H = 10H
In the first example, if destination working register R0 contains the value 1BH, the statement "INC
R0" leaves the value 1CH in that same register.
The next example shows the effect an INC instruction has on register 00H, assuming that it
contains the value 0CH.
In the third example, INC is used in Indirect Register (IR) addressing mode to increment the value
of register 1BH from 0FH to 10H.
Summary of Contents for KS86C6004
Page 19: ...ADDRESS SPACES KS86C6004 C6008 P6008 MICROCONTROLLER Preliminary Spec 2 8 NOTES ...
Page 61: ...CONTROL REGISTERS KS86C6004 C6008 P6008 MICROCONTROLLER Preliminary Spec 4 30 NOTES ...
Page 120: ...CLOCK CIRCUIT KS86C6004 C6008 P6008 MICROCONTROLLERS Preliminary Spec 7 4 NOTES ...
Page 134: ...I O PORTS KS86C6004 C6008 P6008 MICROCONTROLLER Preliminary Spec 9 10 NOTES ...
Page 143: ...KS86C6004 C6008 P6008 MICROCONTROLLER Preliminary Spec BASIC TIMER and TIMER 0 10 9 NOTES ...
Page 162: ...KS86C6004 C6008 P6008 MICROCONTROLLER Preliminary Spec ELECTRICAL DATA 12 9 ...
Page 164: ...KS86C6004 C6008 P6008 MICROCONTROLLER Preliminary Spec ELECTRICAL DATA 12 11 NOTES ...
Page 172: ...KS86P6008 OTP KS86C6004 C6008 P6008 MICROCONTROLLER Preliminary Spec 14 6 NOTES ...