Keil Logo Arm Logo

XCH

The XCH instruction loads the accumulator with the byte value of the specified operand while simultaneously storing the previous contents of the accumulator in the specified operand.

See Also: SWAP, XCHD

XCH A, @Ri
C AC F0 RS1 RS0 OV   P
Bytes 1
Cycles 1
Encoding
1100011i
Operation
XCH
A swap (Ri)
Example
XCH A, @R0
XCH A, direct
C AC F0 RS1 RS0 OV   P
Bytes 2
Cycles 1
Encoding
11000101 direct
Operation
XCH
A swap (direct)
Example
XCH A, 45h
XCH A, Rn
C AC F0 RS1 RS0 OV   P
Bytes 1
Cycles 1
Encoding
11001nnn
Operation
XCH
A swap Rn
Example
XCH A, R6

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings