Samsung KS57C2308 Manual page 164

Single-chip cmos microcontroller
Table of Contents

Advertisement

SAM47 INSTRUCTION SET
XCH
— Exchange A or EA with Nibble or Byte
XCH
dst,src
Operation:
Operand
A,DA
A,Ra
A,@RRa
EA,DA
EA,RRb
EA,@HL
Description:
The instruction XCH loads the accumulator with the contents of the indicated destination variable
and writes the original contents of the accumulator to the source.
Operand
A,DA
A,Ra
A,@RRa
EA,DA
EA,RRb
EA,@HL
Example:
Double register HL contains the address 20H. The accumulator contains the value 3FH
(00111111B) and internal RAM location 20H the value 75H (01110101B). The instruction
XCH
leaves RAM location 20H with the value 3FH (00111111B) and the extended accumulator with
the value 75H (01110101B).
5-90
Exchange A and data memory contents
Exchange A and register (Ra) contents
Exchange A and indirect data memory
Exchange EA and direct data memory contents
Exchange EA and register pair (RRb) contents
Exchange EA and indirect data memory contents
Binary Code
0
1
1
a7
a6
a5
0
1
1
0
1
1
1
1
0
a7
a6
a5
1
1
0
1
1
1
1
1
0
0
0
0
EA,@HL
Operation Summary
1
1
0
0
a4
a3
a2
a1
a0
0
1
r2
r1
r0
1
1
i2
i1
0
1
1
1
a4
a3
a2
a1
a0
1
1
1
0
0
0
r2
r1
1
1
1
0
0
0
0
0
KS57C2308/P2308/C2316/P2316
Bytes
Operation Notation
1
A
DA
A
Ra
i0
A
(RRa)
1
A
DA,E
DA + 1
0
EA
RRb
0
0
A
(HL), E
(HL + 1)
1
Cycles
2
2
1
1
1
1
2
2
2
2
2
2

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

P2308C2316P2316Ks57p2308Ks57c2316Ks57p2316

Table of Contents