SAM47 INSTRUCTION SET
INCS
— Increment and Skip on Carry
INCS
dst
Operation:
Operand
R
DA
@HL
RRb
Description:
The instruction INCS increments the value of the destination operand by one. An original value
of 0FH will, for example, overflow to 00H. If a carry occurs, the next instruction is skipped. The
carry flag value is unaffected.
Operand
R
DA
@HL
RRb
Example:
Register pair HL contains the value 7EH (01111110B). RAM location 7EH contains 0FH. The
instruction sequence
INCS
INCS
INCS
leaves the register pair HL with the value 7EH and RAM location 7EH with the value 1H. Since a
carry occurred, the second instruction is skipped. The carry flag value remains unchanged.
5-54
Operation Summary
Increment register (R); skip on carry
Increment direct data memory; skip on carry
Increment indirect data memory; skip on carry
Increment register pair (RRb); skip on carry
Binary Code
0
1
0
1
1
0
a7
a6
a5
a4
1
1
0
0
1
1
1
0
0
@HL
HL
@HL
1
1
r2
r1
r0
0
1
0
1
0
a3
a2
a1
a0
1
1
1
0
1
0
0
0
1
0
0
0
r2
r1
0
; 7EH
"0"
; Skip
; 7EH
"1"
KS57C2308/P2308/C2316/P2316
Bytes
1
2
2
1
Operation Notation
R
R + 1; skip on carry
DA
DA + 1; skip on carry
(HL)
(HL) + 1; skip on carry
RRb
RRb + 1; skip on carry
Cycles
1 + S
2 + S
2 + S
1 + S