作者在 2010-12-18 22:20:39 发布以下内容
#hello.s printf "hello world"
.data
#define string "hello world"
hw: .ascii "Hello world.\n"
.text
.global _start
_start:
#EAX contains the system call value
#EBX contains the file descriptor to write to
#ECX contains the start of the string
#EDX contains the length of the string
movl $4, %eax
movl $1, %ebx
movl $hw, %ecx
movl $14, %edx
int $0x80
#exit program
movl $1, %eax
movl $0, %ebx
int $0x80