title: NASM - how to print a number using int 080h?
body: <p>I'm writing a program in NASM that takes in a string and counts how many letters are in it, and then prints out the results, and I have to use the 080h interupt to do all the writing and reading. I keep a count of the letters in a label in the .data section:</p>
  
  <pre><code>lett:   db 0                            ; letter counter
  </code></pre>
  
  <p>and then I increment it when I find a letter:</p>
  
  <pre><code>inc     byte [lett]
  </code></pre>
  
  <p>but when I go to write to STDOUT, nothing shows up, and I'm not sure if I'm using 080h correctly:</p>
  
  <pre><code>    mov     eax, SYSCALL_WRITE      ; write the letter count to stdout
      mov     ebx, STDOUT             ;
      mov     ecx, lett               ;
      mov     edx, 1                  ;
      int     080h                    ;
  </code></pre>
  
  <p>I know EDX needs to contain the length of the buffer to read from, which I assume is 1, since I set lett to point to one byte, initialized at 0. Is there something wrong here?</p>