### -------------------------------------------------------------------- ### 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: pushl %ebp movl %esp, %ebp ## printf("hello, world\n") pushl $cGreeting call printf addl $4, %esp ## return 0 movl $0, %eax movl %ebp, %esp popl %ebp ret