Using pointers to assign numbers to memory cells
•eax := address a
•[eax] := 1
•means using the contents of eax as address of a memory cell and assign a value to the contents of this memory cell
•
•In C language it is called a “pointer” and we write:
•int *a;       // definition of a pointer
•*a = 1;      // get memory cell (dereferencing a pointer) and assign a value to it
•
•In Assembler we write:
•lea    eax, a          ; load the address a into eax
•mov [eax], 1        ; use eax as a pointer
•
•In WinDbg disassembly output we see:
•00411a2e 8d0504854200     lea       eax,[PointersProject!a (00428504)]
•00411a34 c60001                 mov     byte ptr [eax],0x1