3 ms·
For me, I remember the notation by correlating it to its "high-level" equivalent. mov eax, [ ptr ] is like eax = *ptr; // or, eax = ptr[ 0 ]; The off
by oso2k 12y ago
For me, I remember the notation by correlating it to its "high-level" equivalent.
mov eax, [ ptr ]
is like
eax = *ptr; // or, eax = ptr[ 0 ];
The offset/multiplier memory addressing format for AT&T syntax was always more troubling for me. Coming from a TASM/MASM/NASM/PASCAL/x86 background first, it felt "icky" to put offsets outside of the "brackets" (or parenthesis, as it were) [0][1].
[0] https://github.com/lpsantil/rt0/blob/master/src/lib/00_start.c#L14 https://github.com/lpsantil/rt0/blob/master/src/lib/00_start...
[1] https://github.com/lpsantil/rt0/blob/master/src/lib/00_start.c#L21 https://github.com/lpsantil/rt0/blob/master/src/lib/00_start...