Mov command values ​​in nasm

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]

+3
source share
2 answers

mov EAX, EBX

moves the EBX value to EAX, and

mov EAX, [EBX]

moves the address value to EBX (therefore, EBX must contain a valid address if it does not return a segmentation error) in EAX.

+8
source

Can you read C? If so, then, given the previous definitions int a, b;, the first command is more or less equivalent

a = b;

, int a, *b;,

a = *b;

, EAX EBX , -.

, , , .

(, NASM, , , , GNU. NASM , , GNU . NASM " Intel" AT & T).

+3

All Articles