Professional Documents
Culture Documents
3) Consider an example to understand the behavior of MOV instruction. In the code given
below, a and b are the variables. DB is used for storing byte and DW is used for storing a
word (2 bytes).
4) The XCHG instruction exchanges the contents of the source and destination. Both operands
should be of the same type either word (16 bits) or a byte (8 bits). It does not support segment
1
Assembly Language Lab
registers. The direct exchange of data between memory locations is illegal. Both operands
should be a general-purpose register.
5) It is an increment instruction which takes only one operand. The INC instruction adds 1 to
the contents of destination operand.
6) It is a decrement instruction which takes only one operand. The DEC instruction subtracts 1
from the contents of destination operand.
7) Simple Input/output
2
Assembly Language Lab