作者在 2010-12-20 21:14:35 发布以下内容
#int_printf.s printf int
.data
a:
.long 4
str:
.ascii "the a is 'xxxx'\n"
.text
.global _start
_start:
movl a, %eax
or $0x30, %eax
movl $str, %edi
movl %eax, 10(%edi)
movl $4, %eax
movl $1, %ebx
movl $str, %ecx
movl $17, %edx
int $0x80
movl $1, %eax
movl $0, %ebx
int $0x80
.data
a:
.long 4
str:
.ascii "the a is 'xxxx'\n"
.text
.global _start
_start:
movl a, %eax
or $0x30, %eax
movl $str, %edi
movl %eax, 10(%edi)
movl $4, %eax
movl $1, %ebx
movl $str, %ecx
movl $17, %edx
int $0x80
movl $1, %eax
movl $0, %ebx
int $0x80