Describe the operation performed by each of the instructions

Describe the operation performed by each of the instructions that follows.

a) XCHG[DATA],AX

b) XCHG[BX][DI] +4,AX

Thanks.

Solution

Ans)

The XCHG (exchange data) instruction exchanges the contents of two operands.

In case of

a) XCHG[DATA],AX

and Puts the contents in memory  location whose address is DATA into register AX

-----------------------------------------------------

b) XCHG[BX][DI]+4,AX

Puts the contents of AX into the memory location whose address is the sum of the contents of BX and DI+4

and puts the contents in memory  location whose address is the sum of the contents of BX and DI+4 into register AX

Describe the operation performed by each of the instructions that follows. a) XCHG[DATA],AX b) XCHG[BX][DI] +4,AX Thanks.SolutionAns) The XCHG (exchange data) i

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site