title: Outputting registers to the console with MASM
body: <p>I'm one day into learning ASM and I've done a few tutorials, and even successfully modified the tutorial content to use jmp and cmp, etc instead of the MASM .if and .while macros.</p>
  
  <p>I've decided to try and write something very, very simple to begin with before I continue with more advanced tutorials. I'm writing a Fibonacci number generator. Here is the source I have so far:</p>
  
  <pre><code>.386
  .model flat, stdcall
  
  option casemap :none
  
  include \masm32\include\windows.inc
  include \masm32\include\kernel32.inc
  include \masm32\include\masm32.inc
  
  includelib \masm32\lib\kernel32.lib
  includelib \masm32\lib\masm32.lib
  
  .code
  start:
  
    mov eax, 1
    mov ecx, 1
  
    _a:
  
      push eax
      add  eax, ecx
      pop  ecx
  
      ; Jump to _b if there is an overflow on eax
  
      ; Print Values Here
  
    jmp _a
  
    _b:
  
    push 0
    call ExitProcess
  
  end start
  </code></pre>
  
  <p>I intend to check for overflows on eax/ecx but right now I'm just interested in displaying the values of eax/ecx on the screen.</p>
  
  <p>I know how to push the address of a constant string from .data and call StdOut which was the first example in the hello world tutorial, but this appears to be quite different (?).</p>