2

translate this line:

mov [p2_label + ecx * 8], eax

what I understand it something like this:

movl %eax, (%ebx,%ecx,8)

But with label instead %ebx and it's not work for me.

Peter Cordes
  • 328,167
  • 45
  • 605
  • 847
Nms1
  • 21
  • 2
  • 1
    Try `movl %eax, p2_label(,%ecx, 8)`. – fuz Jan 28 '21 at 16:01
  • 1
    Note quite a duplicate of [A couple of questions about \[base + index\*scale + disp\]](https://stackoverflow.com/q/27936196)). Also a much longer example that happens to include valid syntax for this: [Declaring and indexing an integer array of qwords in assembly](https://stackoverflow.com/q/58402110). Also you could look at C compiler output for array access: [How to remove "noise" from GCC/clang assembly output?](https://stackoverflow.com/q/38552116) – Peter Cordes Jan 28 '21 at 19:12

0 Answers0