title: Sum of the numbers between 1 to 100
body: <p>I'm a newbish in ASM.
  I'm trying to accomplish a simple task - sum of the numbers between 1 to 100, <code>eax</code> will hold the sum.<br>
  e.g: <code>1 + 2 + 3 + .. + 100</code></p>
  
  <p>So here's the relevant code:</p>
  
  <pre><code>    XOR eax, eax ;; Set eax to 0
  MOV ecx, 100 ;; We will loop 100 times
  my_loop:
      ADD eax, ecx ;; We add the ecx register value to eax, ecx decreses by 1 every iteration untill he reaches 0
  LOOP my_loop
    ;;Exit the program, eax is the exit code
  push eax
  call ExitProcess
  </code></pre>
  
  <p>When I debug the exe file, <code>eax</code> is being 0. How is it possible?</p>
  
  <p>BTW, is there any easy way to print the value of <code>EAX</code> to the console, instead of opening Windbg to check its value?</p>