title: Meaning of "ds:" in assembly language
body: <p>I'm just a beginner in assembly language and have probably silly question. What is difference between those two lines?</p>
  
  <pre><code>3e 8b 06 mov eax,DWORD PTR ds:[esi]
  8b 06    mov eax,DWORD PTR [esi]
  </code></pre>
  
  <p>In my opinion it does the same, I also tried this program:</p>
  
  <pre><code>int main()
  {
      __asm
      {
          mov esi, ebx
          mov eax,DWORD PTR [esi]
          mov ebx,DWORD PTR ds:[esi]
      }
  
      return 0;
  }
  </code></pre>
  
  <p>And it confirmed my guess, so asking for you guys, if there is any difference. Why would we need two instructions that does the same but have different length opcodes.</p>