Contents    Page-10    Prev    Next    Page+10    Index   

Move (Load/Store) Instructions

Most of the instructions used in a computer program are instructions that move data. The x86 processor uses variable-length instructions and offers very flexible addressing options.

The Unix syntax of x86 instructions shows data movement from left to right:


#  code for i := 0
   movl   $0,%eax         #  0 -> %eax
   movl   %eax,-32(%rbp)  #  %eax -> i

There are three data formats that we will use:

Instruction Terminology Bits Use For
MOVL long 32 Integer
MOVQ quad-word 64 Pointer
MOVSD signed double 64 Float