I'm a little rusty in the assembly. I want to ask you some questions.
1) Are these assembly instructions valid in NASM?2) What are the differences, and when should we use them?
mov EAX, EBX
against
mov EAX, [EBX]
moves the EBX value to EAX, and
moves the address value to EBX (therefore, EBX must contain a valid address if it does not return a segmentation error) in EAX.
Can you read C? If so, then, given the previous definitions int a, b;, the first command is more or less equivalent
int a, b;
a = b;
, int a, *b;,
int a, *b;
a = *b;
, EAX EBX , -.
, , , .
(, NASM, , , , GNU. NASM , , GNU . NASM " Intel" AT & T).