title: x86 assembly - GetStdHandle & WriteConsole
body: <p>In response to my question about Windows API's, I have successfully gotten it to work. My question is in regards to this code:</p>
  
  <pre><code>push STD_OUTPUT_HANDLE
      call GetStdHandle
      push NULL
      push offset other
      push mlen
      push offset msg
      push eax
      call WriteConsole
  push    0
  call ExitProcess
  </code></pre>
  
  <p>This code is supposed to print the value of <code>msg</code>. Why does one need to do:</p>
  
  <p>a)</p>
  
  <pre><code>push STD_OUTPUT_HANDLE
      call GetStdHandle
      push NULL
  </code></pre>
  
  <p>And:</p>
  
  <p>b)</p>
  
  <pre><code>push offset other
      push mlen
      push offset msg
      push eax
  </code></pre>
  
  <p>I am just wondering what the need is for getting a <code>StdHandle</code> and pushing offsets.</p>
  
  <p>Thanks in advance,</p>
  
  <p>Progrmr</p>