Operands of this type, such as [ebp] , are called memory operands .
All the answers here are good, but I see that no one is talking about a warning, following this as a strict rule - if the brackets are then dereferenced, except when the lea command is .
lea is an exception to the above rule. Let's say we
mov eax, [ebp - 4]
The ebp value is subtracted by 4, and the brackets indicate that the resulting value is taken as the address, and the value located at this address is stored in eax . However, in the case of lea brackets do not mean that:
lea eax, [ebp - 4]
The ebp value is subtracted by 4, and the resulting value is stored in eax . This instruction simply calculated the address and stored the calculated value in the destination register. See this post for more details.
legends2k Sep 13 '14 at 14:20 2014-09-13 14:20
source share