.data _hello: .asciz "hello world\n" .global main .text main: subq $8, %rsp # Handling the run-time stack (ignore) movb $0, %al leaq _hello(%rip), %rdi # %rdi holds 1st argument in fn call call printf # Print what's in %rdi movq $0, %rdi # 0 is to be returned call _exit # Return it as you get out