If I'm wrong, please let me know in the comment. The mov instruction can be used in the next C code: int a = 5; // mov eax, 0x5 then mov "stack address", eax int b = a; //mov eax, "stack address" then mov "another stack address", eax And for lea instruction, the C code would be this: int *pB = &b; //lea eax, "stack address of b" then mov "stack address for pointer", eax I figured out this because I wrote a simple C code and decompiled it into assembly x86, but not sure since I am a beginner
Hey there! Hope i am not too late... The video uses AT&T syntax (another way to write assembly), which follows the following syntax: operation source, destination - mov $10, %eax ( the $ and % is part of the AT&T syntax) In intel syntax (mostly used on nasm and the windows world) the syntax is operation destination, source - mov eax, 10.
this is so complicated..
I always use "mov" it's simpler
clear and concise explanation, thank you!
Nothing is concise or clear with abominable AT&T syntax
If I'm wrong, please let me know in the comment. The mov instruction can be used in the next C code:
int a = 5; // mov eax, 0x5 then mov "stack address", eax
int b = a; //mov eax, "stack address" then mov "another stack address", eax
And for lea instruction, the C code would be this:
int *pB = &b; //lea eax, "stack address of b" then mov "stack address for pointer", eax
I figured out this because I wrote a simple C code and decompiled it into assembly x86, but not sure since I am a beginner
very nice
Help me clear my mind!
beautiful
Thanks
Does lea actually do the arithmetic faster than a couple of bitshifts and additions?
i man okay but isn't it
operation destination, source
so like
move edx, eax
edx is now eax?
Hey there! Hope i am not too late...
The video uses AT&T syntax (another way to write assembly), which follows the following syntax: operation source, destination - mov $10, %eax ( the $ and % is part of the AT&T syntax)
In intel syntax (mostly used on nasm and the windows world) the syntax is operation destination, source - mov eax, 10.