XCH

Name

Exchange index register and accumulator

Function

The contents of the register specified by REG are exchanged with the
contents of the accumulator. The carry bit is not affected.

Syntax

XCH(R)

Assembled

Binary

1011 RRRR

Decimal

176, then incrementing by 1 until 191 (1st word).

Hexadecimal

0xB0, then incrementing by 1 until 0xBF (1st word).

Symbolic

../../_images/xch-sym.png

Execution

1 word, 8-bit code and an execution time of 10.3 \({\mu}\) sec

Side-effects

Not Applicable

Implemented

xch

Detailed Description

The contents of the register specified by REG are exchanged with the
contents of the accumulator. The carry bit is not affected.

../../_images/xch.png

Example program

If the accumulator contains 1100 and register 0 contains 0011 then the instruction XCH 0 will cause the accumulator to contain 0011 and register 0 to contain 1100.

/ Example program
XCH   0
END

Note

ACBR is the Accumulator Buffer Register (4-bit)