/* Why is this program an infinite loop? */ .section .data noise: .asciz "clunk\n" .section .text .globl _start a_function: pop %eax /* Why 7? Try opening the binary with gdb, and disas _start */ sub $7, %eax push %eax /* Don't look too hard here, it just prints clunk */ mov $4, %eax mov $1, %ebx mov $noise, %ecx mov $6, %edx int $0x80 ret _start: mov %esp, %ebp // Remember this pushes on the instruction pointer call a_function mov $1, %eax mov $0, %ebx int $0x80