fork download
  1. section .text
  2. global _start ;must be declared for linker (ld)
  3.  
  4. _start: ;tell linker entry point
  5.  
  6. mov edx,len ;message length
  7. mov ecx,msg ;message to write
  8. mov ebx,1 ;file descriptor (stdout)
  9. mov eax,4 ;system call number (sys_write)
  10. int 0x80 ;call kernel
  11.  
  12. mov eax,1 ;system call number (sys_exit)
  13. int 0x80 ;call kernel
  14.  
  15. section .data
  16.  
  17. msg db 'Hello, world!',0xa ;our dear string
  18. len equ $ - msg ;length of our dear string
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.s: Assembler messages:
prog.s: Warning: end of file not at end of a line; newline inserted
prog.s:1: Error: no such instruction: `section .text'
prog.s:2: Error: no such instruction: `global _start'
prog.s:2: Error: no such instruction: `must be declared for linker (ld)'
prog.s:4: Error: no such instruction: `tell linker entry point'
prog.s:6: Error: too many memory references for `mov'
prog.s:6: Error: no such instruction: `message length'
prog.s:7: Error: too many memory references for `mov'
prog.s:7: Error: no such instruction: `message to write'
prog.s:8: Error: too many memory references for `mov'
prog.s:8: Error: no such instruction: `file descriptor (stdout)'
prog.s:9: Error: too many memory references for `mov'
prog.s:9: Error: no such instruction: `system call number (sys_write)'
prog.s:10: Error: operand size mismatch for `int'
prog.s:12: Error: too many memory references for `mov'
prog.s:12: Error: no such instruction: `system call number (sys_exit)'
prog.s:13: Error: operand size mismatch for `int'
prog.s:15: Error: no such instruction: `section .data'
prog.s:17: Error: no such instruction: `msg db 72ello,world!440xa'
prog.s:17: Error: no such instruction: `our dear string'
prog.s:18: Error: no such instruction: `len equ $ - msg'
prog.s:18: Error: no such instruction: `length of our dear string'
stdout
Standard output is empty