title: Memory addressing in asm
body: <p>I'm learning asm and here's one of my (many) problems:
  I'd like to change the value of some index of an array.
  Let's say that: </p>
  
  <ul>
  <li>%eax contains my new value</li>
  <li>the top of the stack (ie (0)%esp) contains the index of the array</li>
  <li>-4(%ebp) contains the adress of the array.</li>
  </ul>
  
  <p>I've tried <code>movl %eax, (-4(%ebp),0(%esp),4)</code> but it did not work.
  Worse, it throws a syntax error : bobi.s:15: Error: junk `(%ebp),0(%esp),4)' after expression</p>
  
  <p>What is the correct syntax?</p>