### -------------------------------------------------------------------- ### hello.s ### Author: Bob Dondero ### -------------------------------------------------------------------- .section ".rodata" cGreeting: .string "hello, world\n" ### -------------------------------------------------------------------- .section ".data" ### -------------------------------------------------------------------- .section ".bss" ### -------------------------------------------------------------------- .section ".text" ## ------------------------------------------------------------- ## Write "hello, world\n" to stdout. Return 0. ## int main(void) ## ------------------------------------------------------------- .globl main .type main,@function main: ## printf("hello, world\n") movq $cGreeting, %rdi movl $0, %eax call printf ## return 0 movl $0, %eax ret