4.1 Transfer instructions
They are used to move the contents of the operators. Each instruction can
be used with different modes of addressing.
MOV
MOVS (MOVSB) (MOVSW)
MOV INSTRUCTION
Purpose: Data transfer between memory cells, registers and the accumulator.
Syntax:
MOV Destiny, Source
Where Destiny is the place where the data will be moved and Source is the
place where the data is.
The different movements of data allowed for this instruction are:
*Destiny: memory. Source: accumulator
*Destiny: accumulator. Source: memory
*Destiny: segment register. Source: memory/register
*Destiny: memory/register. Source: segment register
*Destiny: register. Source: register
*Destiny: register. Source: memory
*Destiny: memory. Source: register
*Destiny: register. Source: immediate data
*Destiny: memory. Source: immediate data
Example:
MOV AX,0006h
MOV BX,AX
MOV AX,4C00h
INT 21H
This small program moves the value of 0006H to the AX register, then it
moves the content of AX (0006h) to the BX register, and lastly it moves the
4C00h value to the AX register to end the execution with the 4C option of
the 21h interruption.
MOVS (MOVSB) (MOVSW) Instruction
Purpose: To move byte or word chains from the source, addressed by SI, to
Bạn đang xem 4. - CRACKER HANDBOOK 1 0 PART 54 POT