http://en.wikipedia.org/wiki/X86_assembly_language#Syntax
The ATT syntax uses source before destination, so
movl %edx, %eax
is equivalent to
eax = edx
The more complicated example
movl (%ebx), %eax
is equivalent to
eax = *((int32 *) ebx;
The reason for the int32
is that the instruction has the letter l
at the end (that's a lower case L). Different letters specify different types, but l
specifies a signed 32-bit number. The parentheses around (%ebx)
indicate that an effective address is being specified. An effective address has only one mandatory element (the BASE
address), and 3 optional elements. In your example, only the mandatory base address is supplied. When given an instruction with an effective address, the address is computed as follows
address = base + index * scale + displacement
In the C version of the statement, casting ebx to an (int32 *)
converts the value in ebx
to a pointer that points to an int32
at the effective address, and then dereferencing that pointer reads the 32-bit number at that address.