intd.
MC=’-5l PROGRAMMER’SGUIDEANDINSTRUCTIONSET
XCH Aj<byte>
Function:
Description:
Example:
BxchangeAccumulatorwithbyte variable
XCH leads the Accumulatorwith the contents of the indicatedvariable,at the same time
writing the originalAccumulator
contentsto the indicated variable. The source/destination
operandean w register,direet, or register-indirectaddressing.
ROcontainsthe address20H. The Accumulatorholdsthe value 3FH (OO1lllllB). Internal
RAM location20Hholdsthe value 75H(01110101B).The instruction,
X3-I A,@RO
will leaveRAM location20H holdingthe values3FH (0011111IB) and 75H(O111O1O1B)in
the accumulator.
XCH A,Rn
Bytee: 1
Cycles: 1
Encoding:
1100
Irrr
Operation:
XCH
(A) z (R@
XCH A,direct
Bytes:
2
Cycles: 1
Encoding:
1100 0101
I
directaddress
Operation:
XCH
(A) z (direet)
XCH
A,@Ri
Bytes: 1
cycles: 1
Encoding:
1100
Olli
Operation: XCH
(A) ~ (@))
2-72