
Instruction Set
C500 Family
Semiconductor Group
4-76
1998-04-01
XCH
A, <byte>
Function:
Exchange accumulator with byte variable
Description:
XCH loads the accumulator with the contents of the indicated variable, at the same
time writing the original accumulator contents to the indicated variable. The source/
destination operand can use register, direct, or register-indirect addressing.
Example:
R0 contains the address 20H. The accumulator holds the value 3FH (00111111B).
Internal RAM location 20H holds the value 75H (01110101B). The instruction
XCH
A, @R0
will leave RAM location 20H holding the value 3FH (00111111B) and 75H
(01110101B) in the accumulator.
XCH
A,Rn
Operation:
XCH
(A)
(Rn)
Bytes:
1
Cycles:
1
XCH
A,direct
Operation:
XCH
(A)
(direct)
Bytes:
2
Cycles:
1
Encoding:
1 1 0 0
1 r r r
Encoding:
1 1 0 0
0 1 0 1
direct address
¬
®
¬
®