user2712959
user2712959

Reputation: 101

Assembly Square Brackets

I've always wondered what the difference between

mov esi,eax

and

mov [esi],eax

was.

Any help is appreciated.

Upvotes: 10

Views: 7172

Answers (1)

Michael
Michael

Reputation: 58487

mov esi,eax writes the contents of register eax to register esi.

mov [esi],eax writes the contents of register eax to the memory address specified by register esi (for example, if esi contained the value 0x1234, eax would be written to address 0x1234).

Upvotes: 17

Related Questions