i am a beginner in assembly language i understand many things till now but for many days i stuck in one section it's confusing to me and what make it worst that through the many pages i visited over internet the information is twisted again ,this section is the Addressing Modes specifcally the memory refrence so for example in this Addressing Modes in Assembly Language (IA-32 NASM)
two instructions seems same but the comment is diffrent
- mov esi, var: Copies address of var (say 0x0040120e) into esi
- mov dword [eax], var1: copies value in var1 into the memory slot
specified by eax
both instructions deals with var or var1 which are labels but in comments for one it's mentioned it's copy the content ,while for the other it's copy the address.
and so another question i ask what will be the cooment for this instruction:
- mov bx, [var]
and what is the diffrence between these instructions also
- mov [var], bx-is this only applicaple if var is an array if not what it differ from the next instruction
- mov var, bx
- lea eax, [var] — the value in var is placed in EAX.here it's mean value
- LEA EBX, [MY_TABLE]here its mean effective address
so i need to know what is difference and is there is a confidence source that i can read from and be sure it's correct,by the way i'am using this tutorial,and NASM as assembler under windows.