.section .data hwmessage: .asciz "Hello World\n" filename: .asciz "output_file" .section .text .globl _start _start: movl $5, %eax movl $filename, %ebx movl $01102, %ecx movl $0644, %edx int $0x80 movl %eax, %ebx movl $4, %eax movl $hwmessage, %ecx movl $12, %edx int $0x80 movl $6, %eax // We'll assume the file descriptor is still in ebx! int $0x80 movl $27, %ebx movl $1, %eax int $0x80