title: How to do the address calculation?
body: <p>I saw this case from a website:</p>
  
  <pre><code>cmpl $0x0,-0x20(%ebp)
  
  jne xxx (program terminated   so -0x20(%ebp) == 0)
  
  cmpl $0x1,-0x1c(%ebp)
  
  jne xxx (program terminated   so -0x1c(%ebp) == $1)
  </code></pre>
  
  <p>then:</p>
  
  <pre><code>lea -0x18(%ebp),%ebx
  
  mov -0x4(%ebx),%eax
  </code></pre>
  
  <p>The website said  %eax = -0x4(%ebx) = -1c(%ebp) == $0</p>
  
  <p>So I don't know why -0x4(-0x18(%ebp)) will equal to -1c(%ebp)
  Please help, thank you!</p>