Tuesday, 6 September 2011

Data Transfer Instruction

What is the data transfer instruction? Give example.

Data transfer instructions move data between registers or between memory and registers. For example:

String Forms:

movsb ;move string byte by byte

movsw ;move string word by word

EXAMPLE:

Movsb es, ds ;Copies 8 bits at DS:SI to ES:DI

New String Form (386+):

movzx ;move string with zero extended

movsx ;move string with sign extended

EXAMPLE:

movsx cx, al ;cl get al

movzx cx,al ;cl gets al

No comments:

Post a Comment