===
For extra debugging, you can set gcc to
gcc -g. -- source HtAoE pg 26
gcc -g. -- source HtAoE pg 26
[ebx] in mov eax, [ebx] means that [ebx] is a pointer, kinda like ebx*.leaThe lea instruction places the address specified by its second operand into the register specified by its first operand. Note, the contents of the memory location are not loaded, only the effective address is computed and placed into the register. This is useful for obtaining a pointer into a memory region.
Syntax
lea <reg32>,<mem>
Examples
lea eax, [var] — the address of var is placed in EAX.
lea edi, [ebx+4*esi] — the quantity EBX+4*ESI is placed in EDI.