.text # section declaration (code) .global _start # standard entry point for ELF linker _start: /* write our string to stdout */ movl $len,%edx # third argument: message length movl $msg,%ecx # second argument: pointer to message to write movl $1,%ebx # first argument: file handle (stdout) movl $4,%eax # system call number (sys_write) int $0x80 # call kernel /* and exit */ movl $0,%ebx # first argument: exit code movl $1,%eax # system call number (sys_exit) int $0x80 # call kernel .data # section declaration (data) msg: .ascii "Hello world!\n" # our famous string len = . - msg # string length