Samsung KS57C2308 Manual page 123

Single-chip cmos microcontroller
Table of Contents

Advertisement

KS57C2308/P2308/C2316/P2316
CPSE
— Compare and Skip if Equal
CPSE
dst,src
Operation:
Operand
R,#im
@HL,#im
A,R
A,@HL
EA,@HL
EA,RR
Description:
CPSE compares the source operand (subtracts it from) the destination operand, and skips the
next instruction if the values are equal. Neither operand is affected by the comparison.
Operand
R,#im
@HL,#im
A,R
A,@HL
EA,@HL
EA,RR
Example:
The extended accumulator contains the value 34H and register pair HL contains 56H. The
second instruction (RET) in the instruction sequence
CPSE
RET
is not skipped. That is, the subroutine returns since the result of the comparison is "not equal".
Operation Summary
Compare and skip if register equals #im
Compare and skip if indirect data memory equals #im
Compare and skip if A equals R
Compare and skip if A equals indirect data memory
Compare and skip if EA equals indirect data memory
Compare and skip if EA equals RR
Binary Code
1
1
0
d3
d2
d1
d0
1
1
0
0
1
1
1
1
0
0
1
1
0
0
1
1
1
0
0
0
0
1
1
0
1
1
1
EA,HL
1
1
0
0
1
0
r2
r1
r0
1
1
1
0
1
1
d3
d2
d1
d0
1
1
1
0
1
0
1
r2
r1
r0
1
1
0
0
0
1
1
1
0
0
0
1
0
0
1
1
1
1
0
0
0
1
r2
r1
0
SAM47 INSTRUCTION SET
Bytes
2
2
2
1
2
2
Operation Notation
Skip if R = im
Skip if (HL) = im
Skip if A = R
Skip if A = (HL)
Skip if A = (HL), E = (HL+1)
Skip if EA = RR
Cycles
2 + S
2 + S
2 + S
1 + S
2 + S
2 + S
5-49

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

P2308C2316P2316Ks57p2308Ks57c2316Ks57p2316

Table of Contents