KS57C2308/P2308/C2316/P2316
SAM47 INSTRUCTION SET
5-49
CPSE
— Compare and Skip if Equal
CPSE
dst,src
Operation:
Operand
Operation Summary
Bytes
Cycles
R,#im
Compare and skip if register equals #im
2
2 + S
@HL,#im
Compare and skip if indirect data memory equals #im
2
2 + S
A,R
Compare and skip if A equals R
2
2 + S
A,@HL
Compare and skip if A equals indirect data memory
1
1 + S
EA,@HL
Compare and skip if EA equals indirect data memory
2
2 + S
EA,RR
Compare and skip if EA equals RR
2
2 + S
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
Binary Code
Operation Notation
R,#im
1
1
0
1
1
0
0
1
Skip if R = im
d3
d2
d1
d0
0
r2
r1
r0
@HL,#im
1
1
0
1
1
1
0
1
Skip if (HL) = im
0
1
1
1
d3
d2
d1
d0
A,R
1
1
0
1
1
1
0
1
Skip if A = R
0
1
1
0
1
r2
r1
r0
A,@HL
0
0
1
1
1
0
0
0
Skip if A = (HL)
EA,@HL
1
1
0
1
1
1
0
0
Skip if A = (HL), E = (HL+1)
0
0
0
0
1
0
0
1
EA,RR
1
1
0
1
1
1
0
0
Skip if EA = RR
1
1
1
0
1
r2
r1
0
Example:
The extended accumulator contains the value 34H and register pair HL contains 56H. The
second instruction (RET) in the instruction sequence
CPSE
EA,HL
RET
is not skipped. That is, the subroutine returns since the result of the comparison is “not equal”.
Summary of Contents for KS57C2308
Page 30: ...ADDRESS SPACES KS57C2308 P2308 C2316 P2316 2 22 NOTES ...
Page 168: ...SAM47 INSTRUCTION SET KS57C2308 P2308 C2316 P2316 5 94 NOTES ...
Page 170: ......
Page 206: ...POWER DOWN KS57C2308 P2308 C2316 P2316 8 8 NOTES ...
Page 210: ...RESET KS57C2308 P2308 C2316 P2316 9 4 NOTES ...
Page 222: ...I O PORTS KS57C2308 P2308 C2316 P2316 10 12 NOTES ...
Page 272: ...LCD CONTROLLER DRIVER KS57C2308 P2308 C2316 P2316 12 24 NOTES ...
Page 280: ...SERIAL I O INTERFACE KS57C2308 P2308 C2316 P2316 13 8 NOTES ...
Page 294: ...MECHANICAL DATA KS57C2308 P2308 C2316 P2316 15 2 NOTES ...
Page 310: ...KS57P2308 P2316 OTP KS57C2308 P2308 C2316 P2316 16 16 NOTES ...
Page 318: ......
Page 320: ......
Page 322: ......
Page 325: ......
Page 327: ......