title: simple assembly syscall not working
body: <p>I'm following <a href="http://securitytube.net/Assembly-Primer-for-Hackers-%28Part-1%29-System-Organization-video.aspx" rel="nofollow">those video tutorials</a> on the assembly language.
  I'm basically trying to work out the "hello world" asm example.
  Here is what I've got:</p>
  
  <pre><code>.data
  str:
          .ascii "Hello World"
  
  .text
  .globl _start
  
  _start:
          movl    $4, %eax
          movl    $1, %ebx
          movl    $str, %ecx
          movl    $11, %edx
          int     $0x80
  
          movl    $1, %eax
          movl    $0, %ebx
          int     $0x80
  </code></pre>
  
  <p>This compiles just fine but when I run it, no text is printed to the terminal. I have no idea what I'm doing wrong. Whatever value I mov into the ecx register makes no difference, nothing happens.</p>
  
  <p>Also, other question, how does the syscall work when it call the int 0x80 instruction ?
  Some data has been moved to the registers but when we get to the syscall, it doesn't "use" any of those values. Does it go and get what has been moved to those registers on it's own ?</p>
  
  <p>Some system info that might be helpful:</p>
  
  <pre><code>dominic-@-freebsd-9 ~/dev/asm/tutorial &gt; uname -a
  FreeBSD freebsd-9 5.5-RELEASE FreeBSD 5.5-RELEASE #0: Tue May 23 14:58:27 UTC 2006     root@perseus.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
  </code></pre>