Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

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

Thursday, 21 April 2011

DAD instruction or command

What is a DAD instruction?

DAD - Double Register Add is used to add registers and is used in the assembly programming language.

For example:

Double Add HL to HL