I saw assembly code like,
MOV [EAX], EBX
the above line, They are mentioned [EAX]
is memory and EBX
is Register. So, here what is the difference between [EAX]
and EBX
. What will happen in above instruction.
In this syntax, brackets around a register means a memory location is used (as source or destination, according to the instruction) with starting address specified at the register (EAX in your case). For example, if EAX contained 1344 before the instruction, value from EBX is copied to logical memory addresses 1344-1347 (because this is 4 byte copying).
I hope this is enough to untangle them in your mind:) and please notice more complex cases are possible (e.g. MOV [EAX+ECX],EBX
forms destination address as sum of two register values).