title: Passing Values into Memory location Access Violation in Assembly
body: <p>I will start with this block of code: </p>
  
  <pre><code>mov   eax, 5
  mov   DWORD PTR [eax], 123
  </code></pre>
  
  <p>I am trying to move the value 123 into the memory location at address 5, but I get a write access violation.  The only thing I can guess is that the memory location is already reserved or in use.  But no matter what address I use, it's the same thing.  If I were to read out from the same location, say:</p>
  
  <pre><code>mov   eax, 5
  mov   ebx, DWORD PTR [eax]
  </code></pre>
  
  <p>I get no errors.  What am I missing?</p>
  
  <p>(If it helps, I am coding in MASM, Win 7, 4 gb ram)</p>