title: FASM gives me 'error: illegal instruction.' during assembly
body: <p>I just started coding in assembly. I have downloaded the <a href="http://flatassembler.net/" rel="noreferrer">flat assembler</a> and copied code from the internet. When I run this code, however, it says something like:</p>
  
  <blockquote>
  <pre><code>section .text 
  error: illegal instruction.
  </code></pre>
  </blockquote>
  
  <p>My question is: what is wrong with this code?</p>
  
  <pre><code>section .text
     global_start     ;must be declared for linker (ld)
  
  _start:             ;tells linker entry point
     mov  edx,len     ;message length
     mov  ecx,msg     ;message to write
     mov  ebx,1       ;file descriptor (stdout)
     mov  eax,4       ;system call number (sys_write)
     int  0x80        ;call kernel
  
     mov  eax,1       ;system call number (sys_exit)
     int  0x80        ;call kernel
  
  section .data
  msg db 'Hello, world!', 0xa  ;our dear string
  len equ $ - msg              ;length of our dear string
  </code></pre>
  
  <p>Can somebody figure out what is going wrong?</p>