Indeed.
mov esp, 0
"Move 0 into esp".Seriously, X86? Who came up with that?
mov esp, 0
"Move 0 into esp".Seriously, X86? Who came up with that?
dest := source;
and memcpy(dest, src, size);
as well as obj.set(0);
Numerous assembly languages have destinations on the left.Some have load/store instructions where the memory is always on one side:
load [r1], r3 ; --> direction
store [r1], r3 ; <-- direction
it's a matter of assembler syntax; the "AT&T" syntax used by the GNU assembler and gcc for x86 has destination on the right.This is the Intel syntax and it is the most popular for doing x86 assembly.
The other syntax, the AT&T syntax, works the other way ("mov $0, %esp" puts 0 into esp).
movl $1, %esp xor reg,reg
(recommended way) or sub reg,reg