Monday, April 25, 2016

Description and Example of MOV and XCHG

** The MOV instruction is used to transfer data between registers, between a register and a memory location, or to move a number directly into a register or memory location.

The syntax is -

MOV destination,source
                              -


Here are some examples :

MOV AX,WORD1

This reads "MOVE WORD1 to AX". The contents of register AX are replaced by the contents of memory location WORD1. The contents of WORD1 are unchanged. In other words, a copy of WORD1 is sent to AX 

MOV  AX,BX

AX gets what was previously in BX.BX is unchanged.

MOV   AH,  'A'.

No comments:

Post a Comment